code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
" Vim ftplugin file " Language: FrameScript " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-19 let s:cpo_save = &cpo set cpo&vim if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let b:undo_ftplugin = "setl com< cms< fo< inc< | unlet! b:matchwords" setlocal comments=s1:/*,mb:*,ex:*/,:// commentstring=/*\ %s\ */ setlocal formatoptions-=t formatoptions+=croql setlocal include=^\\s*<#Include if exists("loaded_matchit") let s:not_end = '\c\%(\<End\)\@<!' let b:match_words = \ s:not_end . '\<If\>:\c\<ElseIf\>:\c\<Else\>:\c\<EndIf\>,' . \ s:not_end . '\<Loop\>:\c\<EndLoop\>' . \ s:not_end . '\<Sub\>:\c\<EndSub\>' unlet s:not_end endif let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/framescript.vim
Vim Script
gpl2
768
" Vim filetype plugin file " Language: config " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "Bourne Shell Files (*.sh)\t*.sh\n" . \ "All Files (*.*)\t*.*\n" let s:match_words = "" runtime! ftplugin/sh.vim ftplugin/sh_*.vim ftplugin/sh/*.vim let b:did_ftplugin = 1 " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter endif " Change the :browse e filter to primarily show configure-related files. if has("gui_win32") let b:browsefilter="Configure Scripts (configure.*, config.*)\tconfigure*;config.*\n" . \ s:browsefilter endif " Undo the stuff we changed. let b:undo_ftplugin = "unlet! b:browsefilter | " . b:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo
zyz2011-vim
runtime/ftplugin/config.vim
Vim Script
gpl2
1,274
" Vim filetype plugin " Language: Haml " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2012 Mar 11 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif let s:save_cpo = &cpo set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "All Files (*.*)\t*.*\n" let s:match_words = "" runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim unlet! b:did_ftplugin " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin unlet b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter unlet b:browsefilter endif if exists("b:match_words") let s:match_words = b:match_words unlet b:match_words endif runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim let b:did_ftplugin = 1 " Combine the new set of values with those previously included. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin endif if exists ("b:browsefilter") let s:browsefilter = substitute(b:browsefilter,'\cAll Files (\*\.\*)\t\*\.\*\n','','') . s:browsefilter endif if exists("b:match_words") let s:match_words = b:match_words . ',' . s:match_words endif " Change the browse dialog on Win32 to show mainly Haml-related files if has("gui_win32") let b:browsefilter="Haml Files (*.haml)\t*.haml\nSass Files (*.sass)\t*.sass\n" . s:browsefilter endif " Load the combined list of match_words for matchit.vim if exists("loaded_matchit") let b:match_words = s:match_words endif setlocal comments= commentstring=-#\ %s let b:undo_ftplugin = "setl cms< com< " \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin let &cpo = s:save_cpo unlet s:save_cpo " vim:set sw=2:
zyz2011-vim
runtime/ftplugin/haml.vim
Vim Script
gpl2
1,870
" Vim filetype plugin file " Language: readline(3) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/readline.vim
Vim Script
gpl2
426
" Vim filetype plugin " Language: eRuby " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2012 Mar 11 " URL: http://vim-ruby.rubyforge.org " Anon CVS: See above site " Release Coordinator: Doug Kearns <dougkearns@gmail.com> " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif let s:save_cpo = &cpo set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "All Files (*.*)\t*.*\n" let s:match_words = "" if !exists("g:eruby_default_subtype") let g:eruby_default_subtype = "html" endif if !exists("b:eruby_subtype") let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') if b:eruby_subtype == '' let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+') endif if b:eruby_subtype == '' let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+$') endif if b:eruby_subtype == 'rhtml' let b:eruby_subtype = 'html' elseif b:eruby_subtype == 'rb' let b:eruby_subtype = 'ruby' elseif b:eruby_subtype == 'yml' let b:eruby_subtype = 'yaml' elseif b:eruby_subtype == 'js' let b:eruby_subtype = 'javascript' elseif b:eruby_subtype == 'txt' " Conventional; not a real file type let b:eruby_subtype = 'text' elseif b:eruby_subtype == '' let b:eruby_subtype = g:eruby_default_subtype endif endif if exists("b:eruby_subtype") && b:eruby_subtype != '' exe "runtime! ftplugin/".b:eruby_subtype.".vim ftplugin/".b:eruby_subtype."_*.vim ftplugin/".b:eruby_subtype."/*.vim" else runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim endif unlet! b:did_ftplugin " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin unlet b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter unlet b:browsefilter endif if exists("b:match_words") let s:match_words = b:match_words unlet b:match_words endif runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim let b:did_ftplugin = 1 " Combine the new set of values with those previously included. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin endif if exists ("b:browsefilter") let s:browsefilter = substitute(b:browsefilter,'\cAll Files (\*\.\*)\t\*\.\*\n','','') . s:browsefilter endif if exists("b:match_words") let s:match_words = b:match_words . ',' . s:match_words endif " Change the browse dialog on Win32 to show mainly eRuby-related files if has("gui_win32") let b:browsefilter="eRuby Files (*.erb, *.rhtml)\t*.erb;*.rhtml\n" . s:browsefilter endif " Load the combined list of match_words for matchit.vim if exists("loaded_matchit") let b:match_words = s:match_words endif " TODO: comments= setlocal commentstring=<%#%s%> let b:undo_ftplugin = "setl cms< " \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin let &cpo = s:save_cpo unlet s:save_cpo " vim: nowrap sw=2 sts=2 ts=8:
zyz2011-vim
runtime/ftplugin/eruby.vim
Vim Script
gpl2
3,205
" Vim filetype plugin file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2007-12-04 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/cdrdaoconf.vim
Vim Script
gpl2
375
" Vim filetype plugin " Language: git send-email message " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2009 Dec 24 runtime! ftplugin/mail.vim
zyz2011-vim
runtime/ftplugin/gitsendemail.vim
Vim Script
gpl2
157
" Vim settings file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66) " Version: 0.48 " Last Change: 2012 Apr. 18 " Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www.unb.ca/chem/ajit/> " Usage: Do :help fortran-plugin from Vim " Credits: " Useful suggestions were made by Stefano Zacchiroli, Hendrik Merx, and Ben " Fritz. " Only do these settings when not done yet for this buffer if exists("b:did_ftplugin") finish endif let s:cposet=&cpoptions set cpoptions&vim " Don't do other file type settings for this buffer let b:did_ftplugin = 1 " Determine whether this is a fixed or free format source file " if this hasn't been done yet if !exists("b:fortran_fixed_source") if exists("fortran_free_source") " User guarantees free source form let b:fortran_fixed_source = 0 elseif exists("fortran_fixed_source") " User guarantees fixed source form let b:fortran_fixed_source = 1 else " Modern Fortran allows both fixed and free source form " assume fixed source form unless signs of free source form " are detected in the first five columns of the first s:lmax lines " Detection becomes more accurate and time-consuming if more lines " are checked. Increase the limit below if you keep lots of comments at " the very top of each file and you have a fast computer let s:lmax = 500 if ( s:lmax > line("$") ) let s:lmax = line("$") endif let b:fortran_fixed_source = 1 let s:ln=1 while s:ln <= s:lmax let s:test = strpart(getline(s:ln),0,5) if s:test !~ '^[Cc*]' && s:test !~ '^ *[!#]' && s:test =~ '[^ 0-9\t]' && s:test !~ '^[ 0-9]*\t' let b:fortran_fixed_source = 0 break endif let s:ln = s:ln + 1 endwhile unlet! s:lmax s:ln s:test endif endif " Set comments and textwidth according to source type if (b:fortran_fixed_source == 1) setlocal comments=:!,:*,:C " Fixed format requires a textwidth of 72 for code setlocal tw=72 " If you need to add "&" on continued lines so that the code is " compatible with both free and fixed format, then you should do so " in column 73 and uncomment the next line " setlocal tw=73 else setlocal comments=:! " Free format allows a textwidth of 132 for code but 80 is more usual setlocal tw=80 endif " Set commentstring for foldmethod=marker setlocal cms=!%s " Tabs are not a good idea in Fortran so the default is to expand tabs if !exists("fortran_have_tabs") setlocal expandtab endif " Set 'formatoptions' to break comment and text lines but allow long lines setlocal fo+=tcql setlocal include=^\\c#\\=\\s*include\\s\\+ setlocal suffixesadd+=.f08,.f03,.f95,.f90,.for,.f,.F,.f77,.ftn,.fpp " Define patterns for the matchit plugin if !exists("b:match_words") let s:notend = '\%(\<end\s\+\)\@<!' let s:notselect = '\%(\<select\s\+\)\@<!' let s:notelse = '\%(\<end\s\+\|\<else\s\+\)\@<!' let s:notprocedure = '\%(\s\+procedure\>\)\@!' let b:match_ignorecase = 1 let b:match_words = \ '(:),' . \ '\<select\s*case\>:' . s:notselect. '\<case\>:\<end\s*select\>,' . \ s:notelse . '\<if\s*(.\+)\s*then\>:' . \ '\<else\s*\%(if\s*(.\+)\s*then\)\=\>:\<end\s*if\>,'. \ 'do\s\+\(\d\+\):\%(^\s*\)\@<=\1\s,'. \ s:notend . '\<do\>:\<end\s*do\>,'. \ s:notelse . '\<where\>:\<elsewhere\>:\<end\s*where\>,'. \ s:notend . '\<type\s*[^(]:\<end\s*type\>,'. \ s:notend . '\<forall\>:\<end\s*forall\>,'. \ s:notend . '\<associate\>:\<end\s*associate\>,'. \ s:notend . '\<enum\>:\<end\s*enum\>,'. \ s:notend . '\<interface\>:\<end\s*interface\>,'. \ s:notend . '\<subroutine\>:\<end\s*subroutine\>,'. \ s:notend . '\<function\>:\<end\s*function\>,'. \ s:notend . '\<module\>' . s:notprocedure . ':\<end\s*module\>,'. \ s:notend . '\<program\>:\<end\s*program\>' endif " File filters for :browse e if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "Fortran Files (*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn)\t*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn\n" . \ "All Files (*.*)\t*.*\n" endif let b:undo_ftplugin = "setl fo< com< tw< cms< et< inc<" \ . "| unlet! b:match_ignorecase b:match_words b:browsefilter" let &cpoptions=s:cposet unlet s:cposet " vim:sw=2
zyz2011-vim
runtime/ftplugin/fortran.vim
Vim Script
gpl2
4,257
" Vim filetype plugin file " Language: udev(8) rules file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/udevrules.vim
Vim Script
gpl2
414
" Vim filetype plugin file " Language: C " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2011 Aug 04 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 " Using line continuation here. let s:cpo_save = &cpo set cpo-=C let b:undo_ftplugin = "setl fo< com< ofu< | if has('vms') | setl isk< | endif" " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". setlocal fo-=t fo+=croql " Set completion with CTRL-X CTRL-O to autoloaded function. if exists('&ofu') setlocal ofu=ccomplete#Complete endif " Set 'comments' to format dashed lists in comments. setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// " In VMS C keywords contain '$' characters. if has("vms") setlocal iskeyword+=$ endif " When the matchit plugin is loaded, this makes the % command skip parens and " braces in comments. let b:match_words = &matchpairs . ',^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>' let b:match_skip = 's:comment\|string\|character' " Win32 can filter files in the browse dialog if has("gui_win32") && !exists("b:browsefilter") if &ft == "cpp" let b:browsefilter = "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" . \ "C Header Files (*.h)\t*.h\n" . \ "C Source Files (*.c)\t*.c\n" . \ "All Files (*.*)\t*.*\n" elseif &ft == "ch" let b:browsefilter = "Ch Source Files (*.ch *.chf)\t*.ch;*.chf\n" . \ "C Header Files (*.h)\t*.h\n" . \ "C Source Files (*.c)\t*.c\n" . \ "All Files (*.*)\t*.*\n" else let b:browsefilter = "C Source Files (*.c)\t*.c\n" . \ "C Header Files (*.h)\t*.h\n" . \ "Ch Source Files (*.ch *.chf)\t*.ch;*.chf\n" . \ "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" . \ "All Files (*.*)\t*.*\n" endif endif let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/c.vim
Vim Script
gpl2
1,944
" Vim filetype plugin file " Language: procmail(1) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &l:include = '^\s*INCLUDERC\>' let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/procmail.vim
Vim Script
gpl2
467
" Vim filetype plugin file " Language: man " Maintainer: SungHyun Nam <goweol@gmail.com> " Last Change: 2012 Mar 6 " To make the ":Man" command available before editing a manual page, source " this script from your startup vimrc file. " If 'filetype' isn't "man", we must have been called to only define ":Man". if &filetype == "man" " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 " Ensure Vim is not recursively invoked (man-db does this) " when doing ctrl-[ on a man page reference. if exists("$MANPAGER") let $MANPAGER = "" endif " allow dot and dash in manual page name. setlocal iskeyword+=\.,- " Add mappings, unless the user didn't want this. if !exists("no_plugin_maps") && !exists("no_man_maps") if !hasmapto('<Plug>ManBS') nmap <buffer> <LocalLeader>h <Plug>ManBS endif nnoremap <buffer> <Plug>ManBS :%s/.\b//g<CR>:setl nomod<CR>'' nnoremap <buffer> <c-]> :call <SID>PreGetPage(v:count)<CR> nnoremap <buffer> <c-t> :call <SID>PopPage()<CR> endif let b:undo_ftplugin = "setlocal iskeyword<" endif if exists(":Man") != 2 com -nargs=+ Man call s:GetPage(<f-args>) nmap <Leader>K :call <SID>PreGetPage(0)<CR> endif " Define functions only once. if !exists("s:man_tag_depth") let s:man_tag_depth = 0 let s:man_sect_arg = "" let s:man_find_arg = "-w" try if !has("win32") && $OSTYPE !~ 'cygwin\|linux' && system('uname -s') =~ "SunOS" && system('uname -r') =~ "^5" let s:man_sect_arg = "-s" let s:man_find_arg = "-l" endif catch /E145:/ " Ignore the error in restricted mode endtry func <SID>PreGetPage(cnt) if a:cnt == 0 let old_isk = &iskeyword setl iskeyword+=(,) let str = expand("<cword>") let &l:iskeyword = old_isk let page = substitute(str, '(*\(\k\+\).*', '\1', '') let sect = substitute(str, '\(\k\+\)(\([^()]*\)).*', '\2', '') if match(sect, '^[0-9 ]\+$') == -1 let sect = "" endif if sect == page let sect = "" endif else let sect = a:cnt let page = expand("<cword>") endif call s:GetPage(sect, page) endfunc func <SID>GetCmdArg(sect, page) if a:sect == '' return a:page endif return s:man_sect_arg.' '.a:sect.' '.a:page endfunc func <SID>FindPage(sect, page) let where = system("/usr/bin/man ".s:man_find_arg.' '.s:GetCmdArg(a:sect, a:page)) if where !~ "^/" if matchstr(where, " [^ ]*$") !~ "^ /" return 0 endif endif return 1 endfunc func <SID>GetPage(...) if a:0 >= 2 let sect = a:1 let page = a:2 elseif a:0 >= 1 let sect = "" let page = a:1 else return endif " To support: nmap K :Man <cword> if page == '<cword>' let page = expand('<cword>') endif if sect != "" && s:FindPage(sect, page) == 0 let sect = "" endif if s:FindPage(sect, page) == 0 echo "\nCannot find a '".page."'." return endif exec "let s:man_tag_buf_".s:man_tag_depth." = ".bufnr("%") exec "let s:man_tag_lin_".s:man_tag_depth." = ".line(".") exec "let s:man_tag_col_".s:man_tag_depth." = ".col(".") let s:man_tag_depth = s:man_tag_depth + 1 " Use an existing "man" window if it exists, otherwise open a new one. if &filetype != "man" let thiswin = winnr() exe "norm! \<C-W>b" if winnr() > 1 exe "norm! " . thiswin . "\<C-W>w" while 1 if &filetype == "man" break endif exe "norm! \<C-W>w" if thiswin == winnr() break endif endwhile endif if &filetype != "man" new setl nonu fdc=0 endif endif silent exec "edit $HOME/".page.".".sect."~" " Avoid warning for editing the dummy file twice setl buftype=nofile noswapfile setl ma silent exec "norm 1GdG" let $MANWIDTH = winwidth(0) silent exec "r!/usr/bin/man ".s:GetCmdArg(sect, page)." | col -b" " Remove blank lines from top and bottom. while getline(1) =~ '^\s*$' silent norm ggdd endwhile while getline('$') =~ '^\s*$' silent norm Gdd endwhile 1 setl ft=man nomod setl bufhidden=hide setl nobuflisted endfunc func <SID>PopPage() if s:man_tag_depth > 0 let s:man_tag_depth = s:man_tag_depth - 1 exec "let s:man_tag_buf=s:man_tag_buf_".s:man_tag_depth exec "let s:man_tag_lin=s:man_tag_lin_".s:man_tag_depth exec "let s:man_tag_col=s:man_tag_col_".s:man_tag_depth exec s:man_tag_buf."b" exec s:man_tag_lin exec "norm ".s:man_tag_col."|" exec "unlet s:man_tag_buf_".s:man_tag_depth exec "unlet s:man_tag_lin_".s:man_tag_depth exec "unlet s:man_tag_col_".s:man_tag_depth unlet s:man_tag_buf s:man_tag_lin s:man_tag_col endif endfunc endif " vim: set sw=2:
zyz2011-vim
runtime/ftplugin/man.vim
Vim Script
gpl2
4,689
" Vim filetype plugin file " Language: tcsh " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "csh Files (*.csh)\t*.csh\n" . \ "All Files (*.*)\t*.*\n" runtime! ftplugin/csh.vim ftplugin/csh_*.vim ftplugin/csh/*.vim let b:did_ftplugin = 1 " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter endif " Change the :browse e filter to primarily show tcsh-related files. if has("gui_win32") let b:browsefilter="tcsh Scripts (*.tcsh)\t*.tcsh\n" . s:browsefilter endif " Undo the stuff we changed. let b:undo_ftplugin = "unlet! b:browsefilter | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo
zyz2011-vim
runtime/ftplugin/tcsh.vim
Vim Script
gpl2
1,207
" Vim filetype plugin file " Language: dict(1) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/dictconf.vim
Vim Script
gpl2
422
" Vim filetype plugin file " Language: XFree86 Configuration File " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/xf86conf.vim
Vim Script
gpl2
422
"------------------------------------------------------------------------------ " Description: Perform Ada specific completion & tagging. " Language: Ada (2005) " $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $ " Maintainer: Martin Krischik <krischik@users.sourceforge.net> " Taylor Venable <taylor@metasyntax.net> " Neil Bird <neil@fnxweb.com> " $Author: krischik $ " $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ " Version: 4.6 " $Revision: 887 $ " $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/ftplugin/ada.vim $ " History: 24.05.2006 MK Unified Headers " 26.05.2006 MK ' should not be in iskeyword. " 16.07.2006 MK Ada-Mode as vim-ball " 02.10.2006 MK Better folding. " 15.10.2006 MK Bram's suggestion for runtime integration " 05.11.2006 MK Bram suggested not to use include protection for " autoload " 05.11.2006 MK Bram suggested to save on spaces " 08.07.2007 TV fix default compiler problems. " Help Page: ft-ada-plugin "------------------------------------------------------------------------------ " Provides mapping overrides for tag jumping that figure out the current " Ada object and tag jump to that, not the 'simple' vim word. " Similarly allows <Ctrl-N> matching of full-length ada entities from tags. "------------------------------------------------------------------------------ " Only do this when not done yet for this buffer if exists ("b:did_ftplugin") || version < 700 finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 45 " " Temporarily set cpoptions to ensure the script loads OK " let s:cpoptions = &cpoptions set cpoptions-=C " Section: Comments {{{1 " setlocal comments=O:--,:--\ \ setlocal commentstring=--\ \ %s setlocal complete=.,w,b,u,t,i " Section: case {{{1 " setlocal nosmartcase setlocal ignorecase " Section: formatoptions {{{1 " setlocal formatoptions+=ron " Section: Tagging {{{1 " if exists ("g:ada_extended_tagging") " Make local tag mappings for this buffer (if not already set) if g:ada_extended_tagging == 'jump' if mapcheck('<C-]>','n') == '' nnoremap <unique> <buffer> <C-]> :call ada#Jump_Tag ('', 'tjump')<cr> endif if mapcheck('g<C-]>','n') == '' nnoremap <unique> <buffer> g<C-]> :call ada#Jump_Tag ('','stjump')<cr> endif elseif g:ada_extended_tagging == 'list' if mapcheck('<C-]>','n') == '' nnoremap <unique> <buffer> <C-]> :call ada#List_Tag ()<cr> endif if mapcheck('g<C-]>','n') == '' nnoremap <unique> <buffer> g<C-]> :call ada#List_Tag ()<cr> endif endif endif " Section: Completion {{{1 " setlocal completefunc=ada#User_Complete setlocal omnifunc=adacomplete#Complete if exists ("g:ada_extended_completion") if mapcheck ('<C-N>','i') == '' inoremap <unique> <buffer> <C-N> <C-R>=ada#Completion("\<lt>C-N>")<cr> endif if mapcheck ('<C-P>','i') == '' inoremap <unique> <buffer> <C-P> <C-R>=ada#Completion("\<lt>C-P>")<cr> endif if mapcheck ('<C-X><C-]>','i') == '' inoremap <unique> <buffer> <C-X><C-]> <C-R>=<SID>ada#Completion("\<lt>C-X>\<lt>C-]>")<cr> endif if mapcheck ('<bs>','i') == '' inoremap <silent> <unique> <buffer> <bs> <C-R>=ada#Insert_Backspace ()<cr> endif endif " Section: Matchit {{{1 " " Only do this when not done yet for this buffer & matchit is used " if !exists ("b:match_words") && \ exists ("loaded_matchit") " " The following lines enable the macros/matchit.vim plugin for " Ada-specific extended matching with the % key. " let s:notend = '\%(\<end\s\+\)\@<!' let b:match_words = \ s:notend . '\<if\>:\<elsif\>:\<else\>:\<end\>\s\+\<if\>,' . \ s:notend . '\<case\>:\<when\>:\<end\>\s\+\<case\>,' . \ '\%(\<while\>.*\|\<for\>.*\|'.s:notend.'\)\<loop\>:\<end\>\s\+\<loop\>,' . \ '\%(\<do\>\|\<begin\>\):\<exception\>:\<end\>\s*\%($\|[;A-Z]\),' . \ s:notend . '\<record\>:\<end\>\s\+\<record\>' endif " Section: Compiler {{{1 " if ! exists("g:ada_default_compiler") if has("vms") let g:ada_default_compiler = 'decada' else let g:ada_default_compiler = 'gnat' endif endif if ! exists("current_compiler") || \ current_compiler != g:ada_default_compiler execute "compiler " . g:ada_default_compiler endif " Section: Folding {{{1 " if exists("g:ada_folding") if g:ada_folding[0] == 'i' setlocal foldmethod=indent setlocal foldignore=-- setlocal foldnestmax=5 elseif g:ada_folding[0] == 'g' setlocal foldmethod=expr setlocal foldexpr=ada#Pretty_Print_Folding(v:lnum) elseif g:ada_folding[0] == 's' setlocal foldmethod=syntax endif setlocal tabstop=8 setlocal softtabstop=3 setlocal shiftwidth=3 endif " Section: Abbrev {{{1 " if exists("g:ada_abbrev") iabbrev ret return iabbrev proc procedure iabbrev pack package iabbrev func function endif " Section: Commands, Mapping, Menus {{{1 " call ada#Map_Popup ( \ 'Tag.List', \ 'l', \ 'call ada#List_Tag ()') call ada#Map_Popup ( \'Tag.Jump', \'j', \'call ada#Jump_Tag ()') call ada#Map_Menu ( \'Tag.Create File', \':AdaTagFile', \'call ada#Create_Tags (''file'')') call ada#Map_Menu ( \'Tag.Create Dir', \':AdaTagDir', \'call ada#Create_Tags (''dir'')') call ada#Map_Menu ( \'Highlight.Toggle Space Errors', \ ':AdaSpaces', \'call ada#Switch_Syntax_Option (''space_errors'')') call ada#Map_Menu ( \'Highlight.Toggle Lines Errors', \ ':AdaLines', \'call ada#Switch_Syntax_Option (''line_errors'')') call ada#Map_Menu ( \'Highlight.Toggle Rainbow Color', \ ':AdaRainbow', \'call ada#Switch_Syntax_Option (''rainbow_color'')') call ada#Map_Menu ( \'Highlight.Toggle Standard Types', \ ':AdaTypes', \'call ada#Switch_Syntax_Option (''standard_types'')') " 1}}} " Reset cpoptions let &cpoptions = s:cpoptions unlet s:cpoptions finish " 1}}} "------------------------------------------------------------------------------ " Copyright (C) 2006 Martin Krischik " " Vim is Charityware - see ":help license" or uganda.txt for licence details. "------------------------------------------------------------------------------ " vim: textwidth=78 nowrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab " vim: foldmethod=marker
zyz2011-vim
runtime/ftplugin/ada.vim
Vim Script
gpl2
6,377
" Logtalk filetype plugin file " Language: Logtalk " Maintainer: Paulo Moura <pmoura@logtalk.org> " Latest Revision: 2007-07-06 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let b:undo_ftplugin = "setl ts< sw< fdm< fdc< ai< dict<" "setlocal ts=4 setlocal sw=4 setlocal fdm=syntax setlocal fdc=2 setlocal autoindent setlocal dict=$VIMRUNTIME/ftplugin/logtalk.dict
zyz2011-vim
runtime/ftplugin/logtalk.vim
Vim Script
gpl2
401
" Vim filetype plugin file " Language: modules.conf(5) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s include=^\\s*include setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/modconf.vim
Vim Script
gpl2
465
" Vim filetype plugin file " Language: pascal " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 11 Apr 2011 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 if exists("loaded_matchit") let b:match_ignorecase = 1 " (pascal is case-insensitive) let b:match_words = '\<\%(begin\|case\|record\|object\|try\)\>' let b:match_words .= ':\<^\s*\%(except\|finally\)\>:\<end\>' let b:match_words .= ',\<repeat\>:\<until\>' let b:match_words .= ',\<if\>:\<else\>' endif " Undo the stuff we changed. let b:undo_ftplugin = "unlet! b:match_words"
zyz2011-vim
runtime/ftplugin/pascal.vim
Vim Script
gpl2
667
" Vim filetype plugin file " Language: Perl " Maintainer: Andy Lester <andy@petdance.com> " URL: http://github.com/petdance/vim-perl " Last Change: 2012 Mar 11 if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C setlocal formatoptions+=crq setlocal keywordprg=perldoc\ -f setlocal comments=:# setlocal commentstring=#%s " Change the browse dialog on Win32 to show mainly Perl-related files if has("gui_win32") let b:browsefilter = "Perl Source Files (*.pl)\t*.pl\n" . \ "Perl Modules (*.pm)\t*.pm\n" . \ "Perl Documentation Files (*.pod)\t*.pod\n" . \ "All Files (*.*)\t*.*\n" endif " Provided by Ned Konz <ned at bike-nomad dot com> "--------------------------------------------- setlocal include=\\<\\(use\\\|require\\)\\> setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.pm','') setlocal define=[^A-Za-z_] " The following line changes a global variable but is necessary to make " gf and similar commands work. The change to iskeyword was incorrect. " Thanks to Andrew Pimlott for pointing out the problem. If this causes a " problem for you, add an after/ftplugin/perl.vim file that contains " set isfname-=: set isfname+=: "setlocal iskeyword=48-57,_,A-Z,a-z,: " Set this once, globally. if !exists("perlpath") if executable("perl") try if &shellxquote != '"' let perlpath = system('perl -e "print join(q/,/,@INC)"') else let perlpath = system("perl -e 'print join(q/,/,@INC)'") endif let perlpath = substitute(perlpath,',.$',',,','') catch /E145:/ let perlpath = ".,," endtry else " If we can't call perl to get its path, just default to using the " current directory and the directory of the current file. let perlpath = ".,," endif endif let &l:path=perlpath "--------------------------------------------- " Undo the stuff we changed. let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< kp<" . \ " | unlet! b:browsefilter" " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo
zyz2011-vim
runtime/ftplugin/perl.vim
Vim Script
gpl2
2,210
" Vim filetype plugin file " Language: MetaPost " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=croql if exists(":FixBeginfigs") != 2 command -nargs=0 FixBeginfigs call s:fix_beginfigs() function! s:fix_beginfigs() let i = 1 g/^beginfig(\d*);$/s//\='beginfig('.i.');'/ | let i = i + 1 endfunction endif let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/mp.vim
Vim Script
gpl2
621
" Vim filetype plugin file " Language: Vim's quickfix window " Maintainer: Lech Lorens <Lech.Lorens@gmail.com> " Last Changed: 30 Apr 2012 if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 let b:undo_ftplugin = "set stl<" " Display the command that produced the list in the quickfix window: setlocal stl=%t%{exists('w:quickfix_title')?\ '\ '.w:quickfix_title\ :\ ''}\ %=%-15(%l,%c%V%)\ %P
zyz2011-vim
runtime/ftplugin/qf.vim
Vim Script
gpl2
459
" Vim filetype plugin file " Language: udev(8) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/udevconf.vim
Vim Script
gpl2
422
" Vim filetype plugin file " Language: html " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C setlocal matchpairs+=<:> setlocal commentstring=<!--%s--> setlocal comments=s:<!--,m:\ \ \ \ ,e:--> if exists("g:ft_html_autocomment") && (g:ft_html_autocomment == 1) setlocal formatoptions-=t formatoptions+=croql endif if exists('&omnifunc') " Distinguish between HTML versions " To use with other HTML versions add another " elseif condition to match proper DOCTYPE setlocal omnifunc=htmlcomplete#CompleteTags if &filetype == 'xhtml' let b:html_omni_flavor = 'xhtml10s' else let b:html_omni_flavor = 'html401t' endif let i = 1 let line = "" while i < 10 && i < line("$") let line = getline(i) if line =~ '<!DOCTYPE.*\<DTD ' break endif let i += 1 endwhile if line =~ '<!DOCTYPE.*\<DTD ' " doctype line found above if line =~ ' HTML 3\.2' let b:html_omni_flavor = 'html32' elseif line =~ ' XHTML 1\.1' let b:html_omni_flavor = 'xhtml11' else " two-step detection with strict/frameset/transitional if line =~ ' XHTML 1\.0' let b:html_omni_flavor = 'xhtml10' elseif line =~ ' HTML 4\.01' let b:html_omni_flavor = 'html401' elseif line =~ ' HTML 4.0\>' let b:html_omni_flavor = 'html40' endif if line =~ '\<Transitional\>' let b:html_omni_flavor .= 't' elseif line =~ '\<Frameset\>' let b:html_omni_flavor .= 'f' else let b:html_omni_flavor .= 's' endif endif endif endif " HTML: thanks to Johannes Zellner and Benji Fisher. if exists("loaded_matchit") let b:match_ignorecase = 1 let b:match_words = '<:>,' . \ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' . \ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' . \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>' endif " Change the :browse e filter to primarily show HTML-related files. if has("gui_win32") let b:browsefilter="HTML Files (*.html,*.htm)\t*.htm;*.html\n" . \ "JavaScript Files (*.js)\t*.js\n" . \ "Cascading StyleSheets (*.css)\t*.css\n" . \ "All Files (*.*)\t*.*\n" endif " Undo the stuff we changed. let b:undo_ftplugin = "setlocal commentstring< matchpairs< omnifunc< comments< formatoptions<" . \ " | unlet! b:match_ignorecase b:match_skip b:match_words b:browsefilter" " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo
zyz2011-vim
runtime/ftplugin/html.vim
Vim Script
gpl2
2,935
" Vim filetype plugin file " Language: dictd(8) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/dictdconf.vim
Vim Script
gpl2
423
" Vim filetype plugin file " Language: udev(8) permissions file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/udevperm.vim
Vim Script
gpl2
420
" Vim filetype plugin file " Language: RFC 2614 - An API for Service Location SPI file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:#,:; commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/slpspi.vim
Vim Script
gpl2
455
" Vim filetype plugin file. " Language: Lua 4.0+ " Maintainer: Max Ischenko <mfi@ukr.net> " Last Change: 2012 Mar 07 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim " Set 'formatoptions' to break comment lines but not other lines, and insert " the comment leader when hitting <CR> or using "o". setlocal fo-=t fo+=croql setlocal com=:-- setlocal cms=--%s setlocal suffixesadd=.lua " The following lines enable the macros/matchit.vim plugin for " extended matching with the % key. if exists("loaded_matchit") let b:match_ignorecase = 0 let b:match_words = \ '\<\%(do\|function\|if\)\>:' . \ '\<\%(return\|else\|elseif\)\>:' . \ '\<end\>,' . \ '\<repeat\>:\<until\>' endif " exists("loaded_matchit") let &cpo = s:cpo_save unlet s:cpo_save let b:undo_ftplugin = "setlocal fo< com< cms< suffixesadd<"
zyz2011-vim
runtime/ftplugin/lua.vim
Vim Script
gpl2
973
" Vim filetype plugin file " Language: Aap recipe " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2003 Nov 04 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 " Reset 'formatoptions', 'comments' and 'expandtab' to undo this plugin. let b:undo_ftplugin = "setl fo< com< et<" " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". setlocal fo-=t fo+=croql " Set 'comments' to format dashed lists in comments. setlocal comments=s:#\ -,m:#\ \,e:#,n:#,fb:- " Expand tabs to spaces to avoid trouble. setlocal expandtab
zyz2011-vim
runtime/ftplugin/aap.vim
Vim Script
gpl2
715
" Vim filetype plugin file " Language: csc " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C if exists("loaded_matchit") let b:match_words= \ '\<fix\>:\<endfix\>,' . \ '\<if\>:\<else\%(if\)\=\>:\<endif\>,' . \ '\<!loopondimensions\>\|\<!looponselected\>:\<!endloop\>' endif " Undo the stuff we changed. let b:undo_ftplugin = "unlet! b:match_words" " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo
zyz2011-vim
runtime/ftplugin/csc.vim
Vim Script
gpl2
734
" Vim ftplugin file " Language: NSIS script " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 let s:cpo_save = &cpo set cpo&vim if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let b:undo_ftplugin = "setl com< cms< fo< def< inc<" setlocal comments=s1:/*,mb:*,ex:*/,b:#,:; commentstring=;\ %s setlocal formatoptions-=t formatoptions+=croql setlocal define=^\\s*!define\\%(\\%(utc\\)\\=date\\|math\\)\\= setlocal include=^\\s*!include\\%(/NONFATAL\\)\\= let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/nsis.vim
Vim Script
gpl2
553
" Vim filetype plugin file " Language: jsp " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "Java Files (*.java)\t*.java\n" . \ "HTML Files (*.html, *.htm)\t*.html;*.htm\n" . \ "All Files (*.*)\t*.*\n" let s:match_words = "" runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim unlet b:did_ftplugin " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin unlet b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter unlet b:browsefilter endif if exists("b:match_words") let s:match_words = b:match_words unlet b:match_words endif runtime! ftplugin/java.vim ftplugin/java_*.vim ftplugin/java/*.vim let b:did_ftplugin = 1 " Combine the new set of values with those previously included. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin endif if exists ("b:browsefilter") let s:browsefilter = b:browsefilter . s:browsefilter endif if exists("b:match_words") let s:match_words = b:match_words . ',' . s:match_words endif " Load the combined list of match_words for matchit.vim if exists("loaded_matchit") let b:match_words = s:match_words endif " Change the :browse e filter to primarily show JSP-related files. if has("gui_win32") let b:browsefilter="JSP Files (*.jsp)\t*.jsp\n" . s:browsefilter endif " Undo the stuff we changed. let b:undo_ftplugin = "unlet! b:browsefilter b:match_words | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo
zyz2011-vim
runtime/ftplugin/jsp.vim
Vim Script
gpl2
2,011
" Vim filetype plugin " Language: generic git output " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) finish endif let b:did_ftplugin = 1 if !exists('b:git_dir') if expand('%:p') =~# '[\/]\.git[\/]modules[\/]' " Stay out of the way elseif expand('%:p') =~# '\.git\>' let b:git_dir = matchstr(expand('%:p'),'.*\.git\>') elseif $GIT_DIR != '' let b:git_dir = $GIT_DIR endif if (has('win32') || has('win64')) && exists('b:git_dir') let b:git_dir = substitute(b:git_dir,'\\','/','g') endif endif if exists('*shellescape') && exists('b:git_dir') && b:git_dir != '' if b:git_dir =~# '/\.git$' " Not a bare repository let &l:path = escape(fnamemodify(b:git_dir,':h'),'\, ').','.&l:path endif let &l:path = escape(b:git_dir,'\, ').','.&l:path let &l:keywordprg = 'git --git-dir='.shellescape(b:git_dir).' show' else setlocal keywordprg=git\ show endif if has('gui_running') let &l:keywordprg = substitute(&l:keywordprg,'^git\>','git --no-pager','') endif setlocal includeexpr=substitute(v:fname,'^[^/]\\+/','','') let b:undo_ftplugin = "setl keywordprg< path< includeexpr<"
zyz2011-vim
runtime/ftplugin/git.vim
Vim Script
gpl2
1,191
" Vim filetype plugin file " Language: VisualBasic (ft=vb) " Maintainer: Johannes Zellner <johannes@zellner.org> " Last Change: Thu, 22 Nov 2001 12:56:14 W. Europe Standard Time if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 setlocal com=sr:'\ -,mb:'\ \ ,el:'\ \ ,:' " we need this wrapper, as call doesn't allow a count fun! <SID>VbSearch(pattern, flags) let cnt = v:count1 while cnt > 0 call search(a:pattern, a:flags) let cnt = cnt - 1 endwhile endfun let s:cpo_save = &cpo set cpo&vim " NOTE the double escaping \\| nnoremap <buffer> <silent> [[ :call <SID>VbSearch('^\s*\(\(private\|public\)\s\+\)\=\(function\\|sub\)', 'bW')<cr> nnoremap <buffer> <silent> ]] :call <SID>VbSearch('^\s*\(\(private\|public\)\s\+\)\=\(function\\|sub\)', 'W')<cr> nnoremap <buffer> <silent> [] :call <SID>VbSearch('^\s*\<end\>\s\+\(function\\|sub\)', 'bW')<cr> nnoremap <buffer> <silent> ][ :call <SID>VbSearch('^\s*\<end\>\s\+\(function\\|sub\)', 'W')<cr> " matchit support if exists("loaded_matchit") let b:match_ignorecase=1 let b:match_words= \ '\%(^\s*\)\@<=\<if\>.*\<then\>\s*$:\%(^\s*\)\@<=\<else\>:\%(^\s*\)\@<=\<elseif\>:\%(^\s*\)\@<=\<end\>\s\+\<if\>,' . \ '\%(^\s*\)\@<=\<for\>:\%(^\s*\)\@<=\<next\>,' . \ '\%(^\s*\)\@<=\<while\>:\%(^\s*\)\@<=\<wend\>,' . \ '\%(^\s*\)\@<=\<do\>:\%(^\s*\)\@<=\<loop\>\s\+\<while\>,' . \ '\%(^\s*\)\@<=\<select\>\s\+\<case\>:\%(^\s*\)\@<=\<case\>:\%(^\s*\)\@<=\<end\>\s\+\<select\>,' . \ '\%(^\s*\)\@<=\<enum\>:\%(^\s*\)\@<=\<end\>\s\<enum\>,' . \ '\%(^\s*\)\@<=\<with\>:\%(^\s*\)\@<=\<end\>\s\<with\>,' . \ '\%(^\s*\)\@<=\%(\<\%(private\|public\)\>\s\+\)\=\<function\>\s\+\([^ \t(]\+\):\%(^\s*\)\@<=\<\1\>\s*=:\%(^\s*\)\@<=\<end\>\s\+\<function\>,' . \ '\%(^\s*\)\@<=\%(\<\%(private\|public\)\>\s\+\)\=\<sub\>\s\+:\%(^\s*\)\@<=\<end\>\s\+\<sub\>' endif let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/vb.vim
Vim Script
gpl2
1,907
" SQL filetype plugin file " Language: SQL (Common for Oracle, Microsoft SQL Server, Sybase) " Version: 8.0 " Maintainer: David Fishburn <dfishburn dot vim at gmail dot com> " Last Change: 2012 May 18 " Download: http://vim.sourceforge.net/script.php?script_id=454 " For more details please use: " :h sql.txt " " This file should only contain values that are common to all SQL languages " Oracle, Microsoft SQL Server, Sybase ASA/ASE, MySQL, and so on " If additional features are required create: " vimfiles/after/ftplugin/sql.vim (Windows) " .vim/after/ftplugin/sql.vim (Unix) " to override and add any of your own settings. " This file also creates a command, SQLSetType, which allows you to change " SQL dialects on the fly. For example, if I open an Oracle SQL file, it " is color highlighted appropriately. If I open an Informix SQL file, it " will still be highlighted according to Oracles settings. By running: " :SQLSetType sqlinformix " " All files called sqlinformix.vim will be loaded from the indent and syntax " directories. This allows you to easily flip SQL dialects on a per file " basis. NOTE: you can also use completion: " :SQLSetType <tab> " " To change the default dialect, add the following to your vimrc: " let g:sql_type_default = 'sqlanywhere' " " This file also creates a command, SQLGetType, which allows you to " determine what the current dialect is in use. " :SQLGetType " " History " " Version 8.0 " " NF: Improved the matchit plugin regex (Talek) " " Version 7.0 " " NF: Calls the sqlcomplete#ResetCacheSyntax() function when calling " SQLSetType. " " Version 6.0 " " NF: Adds the command SQLGetType " " Version 5.0 " " NF: Adds the ability to choose the keys to control SQL completion, just add " the following to your .vimrc: " let g:ftplugin_sql_omni_key = '<C-C>' " let g:ftplugin_sql_omni_key_right = '<Right>' " let g:ftplugin_sql_omni_key_left = '<Left>' " " BF: format-options - Auto-wrap comments using textwidth was turned off " by mistake. " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif let s:save_cpo = &cpo set cpo&vim " Disable autowrapping for code, but enable for comments " t Auto-wrap text using textwidth " c Auto-wrap comments using textwidth, inserting the current comment " leader automatically. setlocal formatoptions-=t setlocal formatoptions+=c " Functions/Commands to allow the user to change SQL syntax dialects " through the use of :SQLSetType <tab> for completion. " This works with both Vim 6 and 7. if !exists("*SQL_SetType") " NOTE: You cannot use function! since this file can be " sourced from within this function. That will result in " an error reported by Vim. function SQL_GetList(ArgLead, CmdLine, CursorPos) if !exists('s:sql_list') " Grab a list of files that contain "sql" in their names let list_indent = globpath(&runtimepath, 'indent/*sql*') let list_syntax = globpath(&runtimepath, 'syntax/*sql*') let list_ftplugin = globpath(&runtimepath, 'ftplugin/*sql*') let sqls = "\n".list_indent."\n".list_syntax."\n".list_ftplugin."\n" " Strip out everything (path info) but the filename " Regex " From between two newline characters " Non-greedily grab all characters " Followed by a valid filename \w\+\.\w\+ (sql.vim) " Followed by a newline, but do not include the newline " " Replace it with just the filename (get rid of PATH) " " Recursively, since there are many filenames that contain " the word SQL in the indent, syntax and ftplugin directory let sqls = substitute( sqls, \ '[\n]\%(.\{-}\)\(\w\+\.\w\+\)\n\@=', \ '\1\n', \ 'g' \ ) " Remove duplicates, since sqlanywhere.vim can exist in the " sytax, indent and ftplugin directory, yet we only want " to display the option once let index = match(sqls, '.\{-}\ze\n') while index > -1 " Get the first filename let file = matchstr(sqls, '.\{-}\ze\n', index) " Recursively replace any *other* occurrence of that " filename with nothing (ie remove it) let sqls = substitute(sqls, '\%>'.(index+strlen(file)).'c\<'.file.'\>\n', '', 'g') " Move on to the next filename let index = match(sqls, '.\{-}\ze\n', (index+strlen(file)+1)) endwhile " Sort the list if using version 7 if v:version >= 700 let mylist = split(sqls, "\n") let mylist = sort(mylist) let sqls = join(mylist, "\n") endif let s:sql_list = sqls endif return s:sql_list endfunction function SQL_SetType(name) " User has decided to override default SQL scripts and " specify a vendor specific version " (ie Oracle, Informix, SQL Anywhere, ...) " So check for an remove any settings that prevent the " scripts from being executed, and then source the " appropriate Vim scripts. if exists("b:did_ftplugin") unlet b:did_ftplugin endif if exists("b:current_syntax") " echomsg 'SQLSetType - clearing syntax' syntax clear endif if exists("b:did_indent") " echomsg 'SQLSetType - clearing indent' unlet b:did_indent " Set these values to their defaults setlocal indentkeys& setlocal indentexpr& endif " Ensure the name is in the correct format let new_sql_type = substitute(a:name, \ '\s*\([^\.]\+\)\(\.\w\+\)\?', '\L\1', '') " Do not specify a buffer local variable if it is " the default value if new_sql_type == 'sql' let new_sql_type = 'sqloracle' endif let b:sql_type_override = new_sql_type " Remove any cached SQL since a new sytax will have different " items and groups if !exists('g:loaded_sql_completion') || 100 == g:loaded_sql_completion call sqlcomplete#ResetCacheSyntax() endif " Vim will automatically source the correct files if we " change the filetype. You cannot do this with setfiletype " since that command will only execute if a filetype has " not already been set. In this case we want to override " the existing filetype. let &filetype = 'sql' if b:sql_compl_savefunc != "" " We are changing the filetype to SQL from some other filetype " which had OMNI completion defined. We need to activate the " SQL completion plugin in order to cache some of the syntax items " while the syntax rules for SQL are active. call sqlcomplete#PreCacheSyntax() endif endfunction command! -nargs=* -complete=custom,SQL_GetList SQLSetType :call SQL_SetType(<q-args>) endif " Functions/Commands to allow the user determine current SQL syntax dialect " This works with both Vim 6 and 7. if !exists("*SQL_GetType") function SQL_GetType() if exists('b:sql_type_override') echomsg "Current SQL dialect in use:".b:sql_type_override else echomsg "Current SQL dialect in use:".g:sql_type_default endif endfunction command! -nargs=0 SQLGetType :call SQL_GetType() endif if exists("b:sql_type_override") " echo 'sourcing buffer ftplugin/'.b:sql_type_override.'.vim' if globpath(&runtimepath, 'ftplugin/'.b:sql_type_override.'.vim') != '' exec 'runtime ftplugin/'.b:sql_type_override.'.vim' " else " echomsg 'ftplugin/'.b:sql_type_override.' not exist, using default' endif elseif exists("g:sql_type_default") " echo 'sourcing global ftplugin/'.g:sql_type_default.'.vim' if globpath(&runtimepath, 'ftplugin/'.g:sql_type_default.'.vim') != '' exec 'runtime ftplugin/'.g:sql_type_default.'.vim' " else " echomsg 'ftplugin/'.g:sql_type_default.'.vim not exist, using default' endif endif " If the above runtime command succeeded, do not load the default settings if exists("b:did_ftplugin") finish endif let b:undo_ftplugin = "setl comments<" " Don't load another plugin for this buffer let b:did_ftplugin = 1 let b:current_ftplugin = 'sql' " Win32 can filter files in the browse dialog if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "SQL Files (*.sql)\t*.sql\n" . \ "All Files (*.*)\t*.*\n" endif " Some standard expressions for use with the matchit strings let s:notend = '\%(\<end\s\+\)\@<!' let s:when_no_matched_or_others = '\%(\<when\>\%(\s\+\%(\%(\<not\>\s\+\)\?<matched\>\)\|\<others\>\)\@!\)' let s:or_replace = '\%(or\s\+replace\s\+\)\?' " Define patterns for the matchit macro if !exists("b:match_words") " SQL is generally case insensitive let b:match_ignorecase = 1 " Handle the following: " if " elseif | elsif " else [if] " end if " " [while condition] loop " leave " break " continue " exit " end loop " " for " leave " break " continue " exit " end loop " " do " statements " doend " " case " when " when " default " end case " " merge " when not matched " when matched " " EXCEPTION " WHEN column_not_found THEN " WHEN OTHERS THEN " " create[ or replace] procedure|function|event " \ '^\s*\<\%(do\|for\|while\|loop\)\>.*:'. let b:match_words = \ '\<begin\>:\<end\>\W*$,'. \ \ s:notend . '\<if\>:'. \ '\<elsif\>\|\<elseif\>\|\<else\>:'. \ '\<end\s\+if\>,'. \ \ '\(^\s*\)\@<=\(\<\%(do\|for\|while\|loop\)\>.*\):'. \ '\%(\<exit\>\|\<leave\>\|\<break\>\|\<continue\>\):'. \ '\%(\<doend\>\|\%(\<end\s\+\%(for\|while\|loop\>\)\)\),'. \ \ '\%('. s:notend . '\<case\>\):'. \ '\%('.s:when_no_matched_or_others.'\):'. \ '\%(\<when\s\+others\>\|\<end\s\+case\>\),' . \ \ '\<merge\>:' . \ '\<when\s\+not\s\+matched\>:' . \ '\<when\s\+matched\>,' . \ \ '\%(\<create\s\+' . s:or_replace . '\)\?'. \ '\%(function\|procedure\|event\):'. \ '\<returns\?\>' " \ '\<begin\>\|\<returns\?\>:'. " \ '\<end\>\(;\)\?\s*$' " \ '\<exception\>:'.s:when_no_matched_or_others. " \ ':\<when\s\+others\>,'. " " \ '\%(\<exception\>\|\%('. s:notend . '\<case\>\)\):'. " \ '\%(\<default\>\|'.s:when_no_matched_or_others.'\):'. " \ '\%(\%(\<when\s\+others\>\)\|\<end\s\+case\>\),' . endif " Define how to find the macro definition of a variable using the various " [d, [D, [_CTRL_D and so on features " Match these values ignoring case " ie DECLARE varname INTEGER let &l:define = '\c\<\(VARIABLE\|DECLARE\|IN\|OUT\|INOUT\)\>' " Mappings to move to the next BEGIN ... END block " \W - no characters or digits nmap <buffer> <silent> ]] :call search('\\c^\\s*begin\\>', 'W' )<CR> nmap <buffer> <silent> [[ :call search('\\c^\\s*begin\\>', 'bW' )<CR> nmap <buffer> <silent> ][ :call search('\\c^\\s*end\\W*$', 'W' )<CR> nmap <buffer> <silent> [] :call search('\\c^\\s*end\\W*$', 'bW' )<CR> vmap <buffer> <silent> ]] :<C-U>exec "normal! gv"<Bar>call search('\\c^\\s*begin\\>', 'W' )<CR> vmap <buffer> <silent> [[ :<C-U>exec "normal! gv"<Bar>call search('\\c^\\s*begin\\>', 'bW' )<CR> vmap <buffer> <silent> ][ :<C-U>exec "normal! gv"<Bar>call search('\\c^\\s*end\\W*$', 'W' )<CR> vmap <buffer> <silent> [] :<C-U>exec "normal! gv"<Bar>call search('\\c^\\s*end\\W*$', 'bW' )<CR> " By default only look for CREATE statements, but allow " the user to override if !exists('g:ftplugin_sql_statements') let g:ftplugin_sql_statements = 'create' endif " Predefined SQL objects what are used by the below mappings using " the ]} style maps. " This global variable allows the users to override it's value " from within their vimrc. " Note, you cannot use \?, since these patterns can be used to search " backwards, you must use \{,1} if !exists('g:ftplugin_sql_objects') let g:ftplugin_sql_objects = 'function,procedure,event,' . \ '\\(existing\\\\|global\\s\\+temporary\\s\\+\\)\\\{,1}' . \ 'table,trigger' . \ ',schema,service,publication,database,datatype,domain' . \ ',index,subscription,synchronization,view,variable' endif " Key to trigger SQL completion if !exists('g:ftplugin_sql_omni_key') let g:ftplugin_sql_omni_key = '<C-C>' endif " Key to trigger drill into column list if !exists('g:ftplugin_sql_omni_key_right') let g:ftplugin_sql_omni_key_right = '<Right>' endif " Key to trigger drill out of column list if !exists('g:ftplugin_sql_omni_key_left') let g:ftplugin_sql_omni_key_left = '<Left>' endif " Replace all ,'s with bars, except ones with numbers after them. " This will most likely be a \{,1} string. let s:ftplugin_sql_objects = \ '\\c^\\s*' . \ '\\(\\(' . \ substitute(g:ftplugin_sql_statements, ',\d\@!', '\\\\\\|', 'g') . \ '\\)\\s\\+\\(or\\s\\+replace\\\s\+\\)\\{,1}\\)\\{,1}' . \ '\\<\\(' . \ substitute(g:ftplugin_sql_objects, ',\d\@!', '\\\\\\|', 'g') . \ '\\)\\>' " Mappings to move to the next CREATE ... block exec "nmap <buffer> <silent> ]} :call search('".s:ftplugin_sql_objects."', 'W')<CR>" exec "nmap <buffer> <silent> [{ :call search('".s:ftplugin_sql_objects."', 'bW')<CR>" " Could not figure out how to use a :call search() string in visual mode " without it ending visual mode " Unfortunately, this will add a entry to the search history exec 'vmap <buffer> <silent> ]} /'.s:ftplugin_sql_objects.'<CR>' exec 'vmap <buffer> <silent> [{ ?'.s:ftplugin_sql_objects.'<CR>' " Mappings to move to the next COMMENT " " Had to double the \ for the \| separator since this has a special " meaning on maps let b:comment_leader = '\\(--\\\|\\/\\/\\\|\\*\\\|\\/\\*\\\|\\*\\/\\)' " Find the start of the next comment let b:comment_start = '^\\(\\s*'.b:comment_leader.'.*\\n\\)\\@<!'. \ '\\(\\s*'.b:comment_leader.'\\)' " Find the end of the previous comment let b:comment_end = '\\(^\\s*'.b:comment_leader.'.*\\n\\)'. \ '\\(^\\s*'.b:comment_leader.'\\)\\@!' " Skip over the comment let b:comment_jump_over = "call search('". \ '^\\(\\s*'.b:comment_leader.'.*\\n\\)\\@<!'. \ "', 'W')" let b:comment_skip_back = "call search('". \ '^\\(\\s*'.b:comment_leader.'.*\\n\\)\\@<!'. \ "', 'bW')" " Move to the start and end of comments exec 'nnoremap <silent><buffer> ]" :call search('."'".b:comment_start."'".', "W" )<CR>' exec 'nnoremap <silent><buffer> [" :call search('."'".b:comment_end."'".', "W" )<CR>' exec 'vnoremap <silent><buffer> ]" :<C-U>exec "normal! gv"<Bar>call search('."'".b:comment_start."'".', "W" )<CR>' exec 'vnoremap <silent><buffer> [" :<C-U>exec "normal! gv"<Bar>call search('."'".b:comment_end."'".', "W" )<CR>' " Comments can be of the form: " /* " * " */ " or " -- " or " // setlocal comments=s1:/*,mb:*,ex:*/,:--,:// " Set completion with CTRL-X CTRL-O to autoloaded function. if exists('&omnifunc') " Since the SQL completion plugin can be used in conjunction " with other completion filetypes it must record the previous " OMNI function prior to setting up the SQL OMNI function let b:sql_compl_savefunc = &omnifunc " This is used by the sqlcomplete.vim plugin " Source it for it's global functions runtime autoload/syntaxcomplete.vim setlocal omnifunc=sqlcomplete#Complete " Prevent the intellisense plugin from loading let b:sql_vis = 1 if !exists('g:omni_sql_no_default_maps') " Static maps which use populate the completion list " using Vim's syntax highlighting rules exec 'imap <buffer> '.g:ftplugin_sql_omni_key.'a <C-\><C-O>:call sqlcomplete#Map("syntax")<CR><C-X><C-O>' exec 'imap <buffer> '.g:ftplugin_sql_omni_key.'k <C-\><C-O>:call sqlcomplete#Map("sqlKeyword")<CR><C-X><C-O>' exec 'imap <buffer> '.g:ftplugin_sql_omni_key.'f <C-\><C-O>:call sqlcomplete#Map("sqlFunction")<CR><C-X><C-O>' exec 'imap <buffer> '.g:ftplugin_sql_omni_key.'o <C-\><C-O>:call sqlcomplete#Map("sqlOption")<CR><C-X><C-O>' exec 'imap <buffer> '.g:ftplugin_sql_omni_key.'T <C-\><C-O>:call sqlcomplete#Map("sqlType")<CR><C-X><C-O>' exec 'imap <buffer> '.g:ftplugin_sql_omni_key.'s <C-\><C-O>:call sqlcomplete#Map("sqlStatement")<CR><C-X><C-O>' " Dynamic maps which use populate the completion list " using the dbext.vim plugin exec 'imap <buffer> '.g:ftplugin_sql_omni_key.'t <C-\><C-O>:call sqlcomplete#Map("table")<CR><C-X><C-O>' exec 'imap <buffer> '.g:ftplugin_sql_omni_key.'p <C-\><C-O>:call sqlcomplete#Map("procedure")<CR><C-X><C-O>' exec 'imap <buffer> '.g:ftplugin_sql_omni_key.'v <C-\><C-O>:call sqlcomplete#Map("view")<CR><C-X><C-O>' exec 'imap <buffer> '.g:ftplugin_sql_omni_key.'c <C-\><C-O>:call sqlcomplete#Map("column")<CR><C-X><C-O>' exec 'imap <buffer> '.g:ftplugin_sql_omni_key.'l <C-\><C-O>:call sqlcomplete#Map("column_csv")<CR><C-X><C-O>' " The next 3 maps are only to be used while the completion window is " active due to the <CR> at the beginning of the map exec 'imap <buffer> '.g:ftplugin_sql_omni_key.'L <C-Y><C-\><C-O>:call sqlcomplete#Map("column_csv")<CR><C-X><C-O>' " <C-Right> is not recognized on most Unix systems, so only create " these additional maps on the Windows platform. " If you would like to use these maps, choose a different key and make " the same map in your vimrc. " if has('win32') exec 'imap <buffer> '.g:ftplugin_sql_omni_key_right.' <C-R>=sqlcomplete#DrillIntoTable()<CR>' exec 'imap <buffer> '.g:ftplugin_sql_omni_key_left.' <C-R>=sqlcomplete#DrillOutOfColumns()<CR>' " endif " Remove any cached items useful for schema changes exec 'imap <buffer> '.g:ftplugin_sql_omni_key.'R <C-\><C-O>:call sqlcomplete#Map("resetCache")<CR><C-X><C-O>' endif if b:sql_compl_savefunc != "" " We are changing the filetype to SQL from some other filetype " which had OMNI completion defined. We need to activate the " SQL completion plugin in order to cache some of the syntax items " while the syntax rules for SQL are active. call sqlcomplete#ResetCacheSyntax() call sqlcomplete#PreCacheSyntax() endif endif let &cpo = s:save_cpo unlet s:save_cpo " vim:sw=4:
zyz2011-vim
runtime/ftplugin/sql.vim
Vim Script
gpl2
19,408
" Vim filetype plugin file " Language: occam " Copyright: Christian Jacobsen <clj3@kent.ac.uk>, Mario Schweigler <ms44@kent.ac.uk> " Maintainer: Mario Schweigler <ms44@kent.ac.uk> " Last Change: 23 April 2003 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:keepcpo= &cpo set cpo&vim "{{{ Indent settings " Set shift width for indent setlocal shiftwidth=2 " Set the tab key size to two spaces setlocal softtabstop=2 " Let tab keys always be expanded to spaces setlocal expandtab "}}} "{{{ Formatting " Break comment lines and insert comment leader in this case setlocal formatoptions-=t formatoptions+=cql setlocal comments+=:-- " Maximum length of comments is 78 setlocal textwidth=78 "}}} "{{{ File browsing filters " Win32 can filter files in the browse dialog if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "All Occam Files (*.occ *.inc)\t*.occ;*.inc\n" . \ "Occam Include Files (*.inc)\t*.inc\n" . \ "Occam Source Files (*.occ)\t*.occ\n" . \ "All Files (*.*)\t*.*\n" endif "}}} "{{{ Undo settings let b:undo_ftplugin = "setlocal shiftwidth< softtabstop< expandtab<" \ . " formatoptions< comments< textwidth<" \ . "| unlet! b:browsefiler" "}}} let &cpo = s:keepcpo unlet s:keepcpo
zyz2011-vim
runtime/ftplugin/occam.vim
Vim Script
gpl2
1,297
" Vim filetype plugin file " Language: passwd(5) password file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/passwd.vim
Vim Script
gpl2
412
" Vim filetype plugin file " Language: MetaFont " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/mf.vim
Vim Script
gpl2
404
" Vim filetype plugin file " Language: Diff " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2005 Jul 27 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let b:undo_ftplugin = "setl modeline<" " Don't use modelines in a diff, they apply to the diffed file setlocal nomodeline
zyz2011-vim
runtime/ftplugin/diff.vim
Vim Script
gpl2
355
" Vim filetype plugin file " Language: Haskell " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=s1fl:{-,mb:-,ex:-},:-- commentstring=--\ %s setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/haskell.vim
Vim Script
gpl2
433
" Vim filetype plugin " Language: git commit file " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2012 April 7 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) finish endif runtime! ftplugin/git.vim let b:did_ftplugin = 1 setlocal nomodeline let b:undo_ftplugin = 'setl modeline<' if &textwidth == 0 " make sure that log messages play nice with git-log on standard terminals setlocal textwidth=72 let b:undo_ftplugin .= "|setl tw<" endif if exists("g:no_gitcommit_commands") || v:version < 700 finish endif if !exists("b:git_dir") let b:git_dir = expand("%:p:h") endif command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>) function! s:diffcomplete(A,L,P) let args = "" if a:P <= match(a:L." -- "," -- ")+3 let args = args . "-p\n--stat\n--shortstat\n--summary\n--patch-with-stat\n--no-renames\n-B\n-M\n-C\n" end if exists("b:git_dir") && a:A !~ '^-' let tree = fnamemodify(b:git_dir,':h') if strpart(getcwd(),0,strlen(tree)) == tree let args = args."\n".system("git diff --cached --name-only") endif endif return args endfunction function! s:gitdiffcached(bang,gitdir,...) let tree = fnamemodify(a:gitdir,':h') let name = tempname() let git = "git" if strpart(getcwd(),0,strlen(tree)) != tree let git .= " --git-dir=".(exists("*shellescape") ? shellescape(a:gitdir) : '"'.a:gitdir.'"') endif if a:0 let extra = join(map(copy(a:000),exists("*shellescape") ? 'shellescape(v:val)' : "'\"'.v:val.'\"'")) else let extra = "-p --stat=".&columns endif call system(git." diff --cached --no-color --no-ext-diff ".extra." > ".(exists("*shellescape") ? shellescape(name) : name)) exe "pedit ".(exists("*fnameescape") ? fnameescape(name) : name) wincmd P let b:git_dir = a:gitdir command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>) nnoremap <buffer> <silent> q :q<CR> setlocal buftype=nowrite nobuflisted noswapfile nomodifiable filetype=git endfunction
zyz2011-vim
runtime/ftplugin/gitcommit.vim
Vim Script
gpl2
2,142
" Vim filetype plugin file " Language: RFC 2614 - An API for Service Location configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:#,:; commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/slpconf.vim
Vim Script
gpl2
465
" Vim filetype plugin file " Language: BTM " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2004 Jul 06 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Behaves just like dosbatch runtime! ftplugin/dosbatch.vim ftplugin/dosbatch_*.vim ftplugin/dosbatch/*.vim
zyz2011-vim
runtime/ftplugin/btm.vim
Vim Script
gpl2
316
" plain TeX filetype plugin " Language: plain TeX (ft=plaintex) " Maintainer: Benji Fisher, Ph.D. <benji@member.AMS.org> " Version: 1.1 " Last Change: Wed 19 Apr 2006 " Only do this when not done yet for this buffer. if exists("b:did_ftplugin") finish endif " Start with initex. This will also define b:did_ftplugin and b:undo_ftplugin . source $VIMRUNTIME/ftplugin/initex.vim " Avoid problems if running in 'compatible' mode. let s:save_cpo = &cpo set cpo&vim let b:undo_ftplugin .= "| unlet! b:match_ignorecase b:match_skip b:match_words" " Allow "[d" to be used to find a macro definition: let &l:define .= '\|\\new\(count\|dimen\|skip\|muskip\|box\|toks\|read\|write' \ . '\|fam\|insert\)' " The following lines enable the macros/matchit.vim plugin for " extended matching with the % key. " There is no default meaning for \(...\) etc., but many users define one. if exists("loaded_matchit") let b:match_ignorecase = 0 \ | let b:match_skip = 'r:\\\@<!\%(\\\\\)*%' \ | let b:match_words = '(:),\[:],{:},\\(:\\),\\\[:\\],\\{:\\}' endif " exists("loaded_matchit") let &cpo = s:save_cpo unlet s:save_cpo " vim:sts=2:sw=2:
zyz2011-vim
runtime/ftplugin/plaintex.vim
Vim Script
gpl2
1,150
" Vim filetype plugin file " Language: cobol " Author: Tim Pope <vimNOSPAM@tpope.info> " $Id: cobol.vim,v 1.1 2007/05/05 17:24:38 vimboss Exp $ " Insert mode mappings: <C-T> <C-D> <Tab> " Normal mode mappings: < > << >> [[ ]] [] ][ " Visual mode mappings: < > if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim setlocal commentstring=\ \ \ \ \ \ *%s setlocal comments=:* setlocal fo+=croqlt setlocal expandtab setlocal textwidth=72 " matchit support if exists("loaded_matchit") let s:ordot = '\|\ze\.\%( \@=\|$\)' let b:match_ignorecase=1 "let b:match_skip = 'getline(".") =~ "^.\\{6\\}[*/C]"' let b:match_words= \ '\$if\>:$else\>:\$endif\>,' . \ '[$-]\@<!\<if\>:\<\%(then\|else\)\>:\<end-if\>'.s:ordot.',' . \ '-\@<!\<perform\s\+\%(\d\+\s\+times\|until\|varying\|with\s\+test\)\>:\<end-perform\>'.s:ordot . ',' . \ '-\@<!\<\%(search\|evaluate\)\>:\<\%(when\)\>:\<end-\%(search\|evaluate\)\>' .s:ordot . ',' . \ '-\@<!\<\%(add\|compute\|divide\|multiply\|subtract\)\>\%(.*\(\%$\|\%(\n\%(\%(\s*\|.\{6\}\)[*/].*\n\)*\)\=\s*\%(not\s\+\)\=on\s\+size\s\+error\>\)\)\@=:\%(\<not\s\+\)\@<!\<\%(not\s\+\)\=on\s\+size\s\+error\>:\<end-\%(add\|compute\|divide\|multiply\|subtract\)\>' .s:ordot . ',' . \ '-\@<!\<\%(string\|unstring\|accept\|display\|call\)\>\%(.*\(\%$\|\%(\n\%(\%(\s*\|.\{6\}\)[*/].*\n\)*\)\=\s*\%(not\s\+\)\=on\s\+\%(overflow\|exception\)\>\)\)\@=:\%(\<not\s\+\)\@<!\<\%(not\s\+\)\=on\s\+\%(overflow\|exception\)\>:\<end-\%(string\|unstring\|accept\|display\|call\)\>' .s:ordot . ',' . \ '-\@<!\<\%(delete\|rewrite\|start\|write\|read\)\>\%(.*\(\%$\|\%(\n\%(\%(\s*\|.\{6\}\)[*/].*\n\)*\)\=\s*\%(invalid\s\+key\|at\s\+end\|no\s\+data\|at\s\+end-of-page\)\>\)\)\@=:\%(\<not\s\+\)\@<!\<\%(not\s\+\)\=\%(invalid\s\+key\|at\s\+end\|no\s\+data\|at\s\+end-of-page\)\>:\<end-\%(delete\|rewrite\|start\|write\|read\)\>' .s:ordot endif if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "COBOL Source Files (*.cbl, *.cob)\t*.cbl;*.cob;*.lib\n". \ "All Files (*.*)\t*.*\n" endif let b:undo_ftplugin = "setlocal com< cms< fo< et< tw<" . \ " | unlet! b:browsefilter b:match_words b:match_ignorecase b:match_skip" if !exists("g:no_plugin_maps") && !exists("g:no_cobol_maps") let b:undo_ftplugin = b:undo_ftplugin . \ " | sil! exe 'nunmap <buffer> <'" . \ " | sil! exe 'nunmap <buffer> >'" . \ " | sil! exe 'nunmap <buffer> <<'" . \ " | sil! exe 'nunmap <buffer> >>'" . \ " | sil! exe 'vunmap <buffer> <'" . \ " | sil! exe 'vunmap <buffer> >'" . \ " | sil! exe 'iunmap <buffer> <C-D>'" . \ " | sil! exe 'iunmap <buffer> <C-T>'" . \ " | sil! exe 'iunmap <buffer> <Tab>'" . \ " | sil! exe 'nunmap <buffer> <Plug>Traditional'" . \ " | sil! exe 'nunmap <buffer> <Plug>Comment'" . \ " | sil! exe 'nunmap <buffer> <Plug>DeComment'" . \ " | sil! exe 'vunmap <buffer> <Plug>VisualTraditional'" . \ " | sil! exe 'vunmap <buffer> <Plug>VisualComment'" . \ " | sil! exe 'iunmap <buffer> <Plug>VisualDeComment'" . \ " | sil! exe 'unmap <buffer> [['" . \ " | sil! exe 'unmap <buffer> ]]'" . \ " | sil! exe 'unmap <buffer> []'" . \ " | sil! exe 'unmap <buffer> ]['" endif if !exists("g:no_plugin_maps") && !exists("g:no_cobol_maps") if version >= 700 nnoremap <silent> <buffer> > :set opfunc=<SID>IncreaseFunc<CR>g@ nnoremap <silent> <buffer> < :set opfunc=<SID>DecreaseFunc<CR>g@ endif nnoremap <silent> <buffer> >> :call CobolIndentBlock(1)<CR> nnoremap <silent> <buffer> << :call CobolIndentBlock(-1)<CR> vnoremap <silent> <buffer> > :call CobolIndentBlock(v:count1)<CR> vnoremap <silent> <buffer> < :call CobolIndentBlock(-v:count1)<CR> inoremap <silent> <buffer> <C-T> <C-R>=<SID>IncreaseIndent()<CR><C-R>=<SID>RestoreShiftwidth()<CR> inoremap <silent> <buffer> <C-D> <C-R>=<SID>DecreaseIndent()<CR><C-R>=<SID>RestoreShiftwidth()<CR> if !maparg("<Tab>","i") inoremap <silent> <buffer> <Tab> <C-R>=<SID>Tab()<CR><C-R>=<SID>RestoreShiftwidth()<CR> endif noremap <silent> <buffer> [[ m':call search('\c^\%(\s*\<Bar>.\{6\}\s\+\)\zs[A-Za-z0-9-]\+\s\+\%(division\<Bar>section\)\s*\.','bW')<CR> noremap <silent> <buffer> ]] m':call search('\c^\%(\s*\<Bar>.\{6\}\s\+\)\zs[A-Za-z0-9-]\+\s\+\%(division\<Bar>section\)\.','W')<CR> noremap <silent> <buffer> [] m':call <SID>toend('b')<CR> noremap <silent> <buffer> ][ m':call <SID>toend('')<CR> " For EnhancedCommentify noremap <silent> <buffer> <Plug>Traditional :call <SID>Comment('t')<CR> noremap <silent> <buffer> <Plug>Comment :call <SID>Comment('c')<CR> noremap <silent> <buffer> <Plug>DeComment :call <SID>Comment('u')<CR> noremap <silent> <buffer> <Plug>VisualTraditional :'<,'>call <SID>Comment('t')<CR> noremap <silent> <buffer> <Plug>VisualComment :'<,'>call <SID>Comment('c')<CR> noremap <silent> <buffer> <Plug>VisualDeComment :'<,'>call <SID>Comment('u')<CR> endif let &cpo = s:cpo_save unlet s:cpo_save if exists("g:did_cobol_ftplugin_functions") finish endif let g:did_cobol_ftplugin_functions = 1 function! s:repeat(str,count) let i = 0 let ret = "" while i < a:count let ret = ret . a:str let i = i + 1 endwhile return ret endfunction function! s:increase(...) let lnum = '.' let sw = &shiftwidth let i = a:0 ? a:1 : indent(lnum) if i >= 11 return sw - (i - 11) % sw elseif i >= 7 return 11-i elseif i == 6 return 1 else return 6-i endif endfunction function! s:decrease(...) let lnum = '.' let sw = &shiftwidth let i = indent(a:0 ? a:1 : lnum) if i >= 11 + sw return 1 + (i + 12) % sw elseif i > 11 return i-11 elseif i > 7 return i-7 elseif i == 7 return 1 else return i endif endfunction function! CobolIndentBlock(shift) let head = strpart(getline('.'),0,7) let tail = strpart(getline('.'),7) let indent = match(tail,'[^ ]') let sw = &shiftwidth let shift = a:shift if shift > 0 if indent < 4 let tail = s:repeat(" ",4-indent).tail let shift = shift - 1 endif let tail = s:repeat(" ",shift*sw).tail let shift = 0 elseif shift < 0 if (indent-4) > -shift * sw let tail = strpart(tail,-shift * sw) elseif (indent-4) > (-shift-1) * sw let tail = strpart(tail,indent - 4) else let tail = strpart(tail,indent) endif endif call setline('.',head.tail) endfunction function! s:IncreaseFunc(type) '[,']call CobolIndentBlock(1) endfunction function! s:DecreaseFunc(type) '[,']call CobolIndentBlock(-1) endfunction function! s:IncreaseIndent() let c = "\<C-T>" if exists("*InsertCtrlTWrapper") let key = InsertCtrlTWrapper() if key != c return key endif endif let interval = s:increase() let b:cobol_shiftwidth = &shiftwidth let &shiftwidth = 1 let lastchar = strpart(getline('.'),col('.')-2,1) if lastchar == '0' || lastchar == '^' return "\<BS>".lastchar.c else return s:repeat(c,interval) endif endfunction function! s:DecreaseIndent() let c = "\<C-D>" if exists("*InsertCtrlDWrapper") " I hack Ctrl-D to delete when not at the end of the line. let key = InsertCtrlDWrapper() if key != c return key endif endif let interval = s:decrease() let b:cobol_shiftwidth = &shiftwidth let &shiftwidth = 1 return s:repeat(c,interval) endfunction function! s:RestoreShiftwidth() if exists("b:cobol_shiftwidth") let &shiftwidth=b:cobol_shiftwidth unlet b:cobol_shiftwidth endif return "" endfunction function! s:Tab() if (strpart(getline('.'),0,col('.')-1) =~ '^\s*$' && &sta) return s:IncreaseIndent() elseif &sts == &sw && &sts != 8 && &et return s:repeat(" ",s:increase(col('.')-1)) else return "\<Tab>" endif endfunction function! s:Comment(arg) " For EnhancedCommentify let line = getline('.') if (line =~ '^.\{6\}[*/C]' || a:arg == 'c') && a:arg != 'u' let line = substitute(line,'^.\{6\}\zs.',' ','') else let line = substitute(line,'^.\{6\}\zs.','*','') endif call setline('.',line) endfunction function! s:toend(direction) let ignore = '^\(\s*\|.\{6\}\)\%([*/]\|\s*$\)' let keep = line('.') keepjumps + while line('.') < line('$') && getline('.') =~ ignore keepjumps + endwhile let res = search('\c^\%(\s*\|.\{6\}\s\+\)\zs[A-Za-z0-9-]\+\s\+\%(division\|section\)\s*\.',a:direction.'W') if a:direction != 'b' && !res let res = line('$') keepjumps $ elseif res keepjumps - endif if res while line('.') > 1 && getline('.') =~ ignore keepjumps - endwhile if line('.') == 1 && getline('.') =~ ignore exe "keepjumps ".keep endif else exe "keepjumps ".keep endif endfunction
zyz2011-vim
runtime/ftplugin/cobol.vim
Vim Script
gpl2
9,392
" Vim filetype plugin " Language: Cucumber " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2010 Aug 09 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) finish endif let b:did_ftplugin = 1 setlocal formatoptions-=t formatoptions+=croql setlocal comments=:# commentstring=#\ %s setlocal omnifunc=CucumberComplete let b:undo_ftplugin = "setl fo< com< cms< ofu<" let b:cucumber_root = expand('%:p:h:s?.*[\/]\%(features\|stories\)\zs[\/].*??') if !exists("g:no_plugin_maps") && !exists("g:no_cucumber_maps") nmap <silent><buffer> <C-]> :<C-U>exe <SID>jump('edit',v:count)<CR> nmap <silent><buffer> <C-W>] :<C-U>exe <SID>jump('split',v:count)<CR> nmap <silent><buffer> <C-W><C-]> :<C-U>exe <SID>jump('split',v:count)<CR> nmap <silent><buffer> <C-W>} :<C-U>exe <SID>jump('pedit',v:count)<CR> let b:undo_ftplugin .= "| sil! iunmap! <C-]>| sil! iunmap! <C-W>]| sil! iunmap! <C-W><C-]>| sil! iunmap! <C-W>}" endif function! s:jump(command,count) let steps = s:steps('.') if len(steps) == 0 || len(steps) < a:count return 'echoerr "No matching step found"' elseif len(steps) > 1 && !a:count return 'echoerr "Multiple matching steps found"' else let c = a:count ? a:count-1 : 0 return a:command.' +'.steps[c][1].' '.escape(steps[c][0],' %#') endif endfunction function! s:allsteps() let step_pattern = '\C^\s*\K\k*\>\s*\zs\S.\{-\}\ze\s*\%(do\|{\)\s*\%(|[^|]*|\s*\)\=\%($\|#\)' let steps = [] for file in split(glob(b:cucumber_root.'/**/*.rb'),"\n") let lines = readfile(file) let num = 0 for line in lines let num += 1 if line =~ step_pattern let type = matchstr(line,'\w\+') let steps += [[file,num,type,matchstr(line,step_pattern)]] endif endfor endfor return steps endfunction function! s:steps(lnum) let c = indent(a:lnum) + 1 while synIDattr(synID(a:lnum,c,1),'name') !~# '^$\|Region$' let c = c + 1 endwhile let step = matchstr(getline(a:lnum)[c-1 : -1],'^\s*\zs.\{-\}\ze\s*$') return filter(s:allsteps(),'s:stepmatch(v:val[3],step)') endfunction function! s:stepmatch(receiver,target) if a:receiver =~ '^[''"].*[''"]$' let pattern = '^'.escape(substitute(a:receiver[1:-2],'$\w\+','(.*)','g'),'/').'$' elseif a:receiver =~ '^/.*/$' let pattern = a:receiver[1:-2] elseif a:receiver =~ '^%r..*.$' let pattern = escape(a:receiver[3:-2],'/') else return 0 endif try let vimpattern = substitute(substitute(pattern,'\\\@<!(?:','%(','g'),'\\\@<!\*?','{-}','g') if a:target =~# '\v'.vimpattern return 1 endif catch endtry if has("ruby") && pattern !~ '\\\@<!#{' ruby VIM.command("return #{if (begin; Kernel.eval('/'+VIM.evaluate('pattern')+'/'); rescue SyntaxError; end) === VIM.evaluate('a:target') then 1 else 0 end}") else return 0 endif endfunction function! s:bsub(target,pattern,replacement) return substitute(a:target,'\C\\\@<!'.a:pattern,a:replacement,'g') endfunction function! CucumberComplete(findstart,base) abort let indent = indent('.') let group = synIDattr(synID(line('.'),indent+1,1),'name') let type = matchstr(group,'\Ccucumber\zs\%(Given\|When\|Then\)') let e = matchend(getline('.'),'^\s*\S\+\s') if type == '' || col('.') < col('$') || e < 0 return -1 endif if a:findstart return e endif let steps = [] for step in s:allsteps() if step[2] ==# type if step[3] =~ '^[''"]' let steps += [step[3][1:-2]] elseif step[3] =~ '^/\^.*\$/$' let pattern = step[3][2:-3] let pattern = substitute(pattern,'\C^(?:|I )','I ','') let pattern = s:bsub(pattern,'\\[Sw]','w') let pattern = s:bsub(pattern,'\\d','1') let pattern = s:bsub(pattern,'\\[sWD]',' ') let pattern = s:bsub(pattern,'\[\^\\\="\]','_') let pattern = s:bsub(pattern,'[[:alnum:]. _-][?*]?\=','') let pattern = s:bsub(pattern,'\[\([^^]\).\{-\}\]','\1') let pattern = s:bsub(pattern,'+?\=','') let pattern = s:bsub(pattern,'(\([[:alnum:]. -]\{-\}\))','\1') let pattern = s:bsub(pattern,'\\\([[:punct:]]\)','\1') if pattern !~ '[\\()*?]' let steps += [pattern] endif endif endif endfor call filter(steps,'strpart(v:val,0,strlen(a:base)) ==# a:base') return sort(steps) endfunction " vim:set sts=2 sw=2:
zyz2011-vim
runtime/ftplugin/cucumber.vim
Vim Script
gpl2
4,391
" LaTeX filetype plugin " Language: LaTeX (ft=tex) " Maintainer: Benji Fisher, Ph.D. <benji@member.AMS.org> " Version: 1.4 " Last Change: Wed 19 Apr 2006 " URL: http://www.vim.org/script.php?script_id=411 " Only do this when not done yet for this buffer. if exists("b:did_ftplugin") finish endif " Start with plain TeX. This will also define b:did_ftplugin . source $VIMRUNTIME/ftplugin/plaintex.vim " Avoid problems if running in 'compatible' mode. let s:save_cpo = &cpo set cpo&vim let b:undo_ftplugin .= "| setl inex<" " Allow "[d" to be used to find a macro definition: " Recognize plain TeX \def as well as LaTeX \newcommand and \renewcommand . " I may as well add the AMS-LaTeX DeclareMathOperator as well. let &l:define .= '\|\\\(re\)\=new\(boolean\|command\|counter\|environment\|font' \ . '\|if\|length\|savebox\|theorem\(style\)\=\)\s*\*\=\s*{\=' \ . '\|DeclareMathOperator\s*{\=\s*' " Tell Vim how to recognize LaTeX \include{foo} and plain \input bar : let &l:include .= '\|\\include{' " On some file systems, "{" and "}" are inluded in 'isfname'. In case the " TeX file has \include{fname} (LaTeX only), strip everything except "fname". let &l:includeexpr = "substitute(v:fname, '^.\\{-}{\\|}.*', '', 'g')" " The following lines enable the macros/matchit.vim plugin for " extended matching with the % key. " ftplugin/plaintex.vim already defines b:match_skip and b:match_ignorecase " and matches \(, \), \[, \], \{, and \} . if exists("loaded_matchit") let b:match_words .= ',\\begin\s*\({\a\+\*\=}\):\\end\s*\1' endif " exists("loaded_matchit") let &cpo = s:save_cpo unlet s:save_cpo " vim:sts=2:sw=2:
zyz2011-vim
runtime/ftplugin/tex.vim
Vim Script
gpl2
1,641
" Vim filetype plugin file " Language: Zimbu " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2012 May 18 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 " Using line continuation here. let s:cpo_save = &cpo set cpo-=C let b:undo_ftplugin = "setl fo< com< ofu< efm< tw< et< sts< sw< | if has('vms') | setl isk< | endif" " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". setlocal fo-=t fo+=croql " Set completion with CTRL-X CTRL-O to autoloaded function. if exists('&ofu') setlocal ofu=ccomplete#Complete endif " Set 'comments' to format dashed lists in comments. " And to keep Zudocu comment characters. setlocal comments=sO:#\ -,mO:#\ \ ,:#=,:#-,:#%,:# setlocal errorformat^=%f\ line\ %l\ col\ %c:\ %m,ERROR:\ %m " When the matchit plugin is loaded, this makes the % command skip parens and " braces in comments. let b:match_words = '\(^\s*\)\@<=\(MODULE\|CLASS\|INTERFACE\|BITS\|ENUM\|SHARED\|FUNC\|REPLACE\|DEFINE\|PROC\|EQUAL\|MAIN\|IF\|GENERATE_IF\|WHILE\|REPEAT\|WITH\|DO\|FOR\|SWITCH\|TRY\)\>\|{\s*$:\(^\s*\)\@<=\(ELSE\|ELSEIF\|GENERATE_ELSE\|GENERATE_ELSEIF\|CATCH\|FINALLY\)\>:\(^\s*\)\@<=}\|\<UNTIL\>' let b:match_skip = 's:comment\|string\|zimbuchar' setlocal tw=78 setlocal et sts=2 sw=2 " Does replace when a dot, space or closing brace is typed. func! GCUpperDot(what) let col = col(".") - strlen(a:what) if v:char != ' ' && v:char != "\r" && v:char != "\x1b" && v:char != '.' && v:char != ')' && v:char != '}' " no space or dot after the typed text let g:got_char = v:char return a:what endif if col > 1 && getline('.')[col - 2] != ' ' " no space before the typed text let g:got_char = 999 return a:what endif let synName = synIDattr(synID(line("."), col(".") - 2, 1), "name") if synName =~ 'Comment\|String\|zimbuCregion\|\<c' " inside a comment or C code let g:got_char = 777 return a:what endif let g:got_char = 1111 return toupper(a:what) endfunc " Does not replace when a dot is typed. func! GCUpper(what) if v:char != ' ' && v:char != "\r" && v:char != "\x1b" && v:char != ')' " no space after the typed text let g:got_char = v:char return a:what endif return GCUpperDot(a:what) endfunc " Only replaces when a space is typed. func! GCUpperSpace(what) if v:char != ' ' " no space after the typed text let g:got_char = v:char return a:what endif return GCUpperDot(a:what) endfunc iabbr <buffer> <expr> alias GCUpperSpace("alias") iabbr <buffer> <expr> arg GCUpperDot("arg") iabbr <buffer> <expr> bad GCUpper("bad") iabbr <buffer> <expr> break GCUpper("break") iabbr <buffer> <expr> case GCUpperSpace("case") iabbr <buffer> <expr> catch GCUpperSpace("catch") iabbr <buffer> <expr> check GCUpperDot("check") iabbr <buffer> <expr> class GCUpperSpace("class") iabbr <buffer> <expr> shared GCUpperSpace("shared") iabbr <buffer> <expr> continue GCUpper("continue") iabbr <buffer> <expr> default GCUpper("default") iabbr <buffer> <expr> extends GCUpper("extends") iabbr <buffer> <expr> do GCUpper("do") iabbr <buffer> <expr> else GCUpper("else") iabbr <buffer> <expr> elseif GCUpperSpace("elseif") iabbr <buffer> <expr> enum GCUpperSpace("enum") iabbr <buffer> <expr> exit GCUpper("exit") iabbr <buffer> <expr> false GCUpper("false") iabbr <buffer> <expr> fail GCUpper("fail") iabbr <buffer> <expr> finally GCUpper("finally") iabbr <buffer> <expr> for GCUpperSpace("for") iabbr <buffer> <expr> func GCUpperSpace("func") iabbr <buffer> <expr> if GCUpperSpace("if") iabbr <buffer> <expr> import GCUpperSpace("import") iabbr <buffer> <expr> in GCUpperSpace("in") iabbr <buffer> <expr> io GCUpperDot("io") iabbr <buffer> <expr> main GCUpper("main") iabbr <buffer> <expr> module GCUpperSpace("module") iabbr <buffer> <expr> new GCUpper("new") iabbr <buffer> <expr> nil GCUpper("nil") iabbr <buffer> <expr> ok GCUpper("ok") iabbr <buffer> <expr> proc GCUpperSpace("proc") iabbr <buffer> <expr> proceed GCUpper("proceed") iabbr <buffer> <expr> return GCUpper("return") iabbr <buffer> <expr> step GCUpperSpace("step") iabbr <buffer> <expr> switch GCUpperSpace("switch") iabbr <buffer> <expr> sys GCUpperDot("sys") iabbr <buffer> <expr> this GCUpperDot("this") iabbr <buffer> <expr> throw GCUpperSpace("throw") iabbr <buffer> <expr> try GCUpper("try") iabbr <buffer> <expr> to GCUpperSpace("to") iabbr <buffer> <expr> true GCUpper("true") iabbr <buffer> <expr> until GCUpperSpace("until") iabbr <buffer> <expr> while GCUpperSpace("while") iabbr <buffer> <expr> repeat GCUpper("repeat") nnoremap <silent> <buffer> [[ m`:call ZimbuGoStartBlock()<CR> nnoremap <silent> <buffer> ]] m`:call ZimbuGoEndBlock()<CR> " Using a function makes sure the search pattern is restored func! ZimbuGoStartBlock() ?^\s*\(FUNC\|PROC\|MAIN\|ENUM\|CLASS\|INTERFACE\)\> endfunc func! ZimbuGoEndBlock() /^\s*\(FUNC\|PROC\|MAIN\|ENUM\|CLASS\|INTERFACE\)\> endfunc let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/zimbu.vim
Vim Script
gpl2
5,102
" Vim filetype plugin " Language: Liquid " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2010 May 21 if exists('b:did_ftplugin') finish endif if !exists('g:liquid_default_subtype') let g:liquid_default_subtype = 'html' endif if !exists('b:liquid_subtype') let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") let b:liquid_subtype = matchstr(s:lines,'liquid_subtype=\zs\w\+') if b:liquid_subtype == '' let b:liquid_subtype = matchstr(&filetype,'^liquid\.\zs\w\+') endif if b:liquid_subtype == '' let b:liquid_subtype = matchstr(substitute(expand('%:t'),'\c\%(\.liquid\)\+$','',''),'\.\zs\w\+$') endif if b:liquid_subtype == '' let b:liquid_subtype = g:liquid_default_subtype endif endif if exists('b:liquid_subtype') && b:liquid_subtype != '' exe 'runtime! ftplugin/'.b:liquid_subtype.'.vim ftplugin/'.b:liquid_subtype.'_*.vim ftplugin/'.b:liquid_subtype.'/*.vim' else runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim endif let b:did_ftplugin = 1 if exists('b:undo_ftplugin') let b:undo_ftplugin .= '|' else let b:undo_ftplugin = '' endif if exists('b:browsefilter') let b:browsefilter = "\n".b:browsefilter else let b:browsefilter = '' endif if exists('b:match_words') let b:match_words .= ',' elseif exists('loaded_matchit') let b:match_words = '' endif if has('gui_win32') let b:browsefilter="Liquid Files (*.liquid)\t*.liquid" . b:browsefilter endif if exists('loaded_matchit') let b:match_words .= '\<\%(if\w*\|unless\|case\)\>:\<\%(elsif\|else\|when\)\>:\<end\%(if\w*\|unless\|case\)\>,\<\%(for\|tablerow\)\>:\%({%\s*\)\@<=empty\>:\<end\%(for\|tablerow\)\>,<\(capture\|comment\|highlight\)\>:\<end\1\>' endif setlocal commentstring={%\ comment\ %}%s{%\ endcomment\ %} let b:undo_ftplugin .= 'setl cms< | unlet! b:browsefilter b:match_words'
zyz2011-vim
runtime/ftplugin/liquid.vim
Vim Script
gpl2
1,897
" Vim ftplugin file " Language: Reva Forth " Version: 7.1 " Last Change: 2008/01/11 " Maintainer: Ron Aaron <ron@ronware.org> " URL: http://ronware.org/reva/ " Filetypes: *.rf *.frt " NOTE: Forth allows any non-whitespace in a name, so you need to do: " setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 " " This goes with the syntax/reva.vim file. " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 setlocal sts=4 sw=4 setlocal com=s1:/*,mb:*,ex:*/,:\|,:\\ setlocal fo=tcrqol setlocal matchpairs+=\::; setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255
zyz2011-vim
runtime/ftplugin/reva.vim
Vim Script
gpl2
709
" Vim filetype plugin file " Language: sgml " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "XML Files (*.xml)\t*.xml\n" . \ "All Files (*.*)\t*.*\n" runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim let b:did_ftplugin = 1 " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter endif " Change the :browse e filter to primarily show xml-related files. if has("gui_win32") let b:browsefilter="SGML Files (*.sgml,*.sgm)\t*.sgm*\n" . s:browsefilter endif " Undo the stuff we changed. let b:undo_ftplugin = "unlet! b:browsefilter | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo
zyz2011-vim
runtime/ftplugin/sgml.vim
Vim Script
gpl2
1,210
" Vim filetype plugin file " Language: generic Changelog file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2011-05-02 " Variables: " g:changelog_timeformat (deprecated: use g:changelog_dateformat instead) - " description: the timeformat used in ChangeLog entries. " default: "%Y-%m-%d". " g:changelog_dateformat - " description: the format sent to strftime() to generate a date string. " default: "%Y-%m-%d". " g:changelog_username - " description: the username to use in ChangeLog entries " default: try to deduce it from environment variables and system files. " Local Mappings: " <Leader>o - " adds a new changelog entry for the current user for the current date. " Global Mappings: " <Leader>o - " switches to the ChangeLog buffer opened for the current directory, or " opens it in a new buffer if it exists in the current directory. Then " it does the same as the local <Leader>o described above. " Notes: " run 'runtime ftplugin/changelog.vim' to enable the global mapping for " changelog files. " TODO: " should we perhaps open the ChangeLog file even if it doesn't exist already? " Problem is that you might end up with ChangeLog files all over the place. " If 'filetype' isn't "changelog", we must have been to add ChangeLog opener if &filetype == 'changelog' if exists('b:did_ftplugin') finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim " Set up the format used for dates. if !exists('g:changelog_dateformat') if exists('g:changelog_timeformat') let g:changelog_dateformat = g:changelog_timeformat else let g:changelog_dateformat = "%Y-%m-%d" endif endif function! s:username() if exists('g:changelog_username') return g:changelog_username elseif $EMAIL != "" return $EMAIL elseif $EMAIL_ADDRESS != "" return $EMAIL_ADDRESS endif let login = s:login() return printf('%s <%s@%s>', s:name(login), login, s:hostname()) endfunction function! s:login() return s:trimmed_system_with_default('whoami', 'unknown') endfunction function! s:trimmed_system_with_default(command, default) return s:first_line(s:system_with_default(a:command, a:default)) endfunction function! s:system_with_default(command, default) let output = system(a:command) if v:shell_error return default endif return output endfunction function! s:first_line(string) return substitute(a:string, '\n.*$', "", "") endfunction function! s:name(login) for name in [s:gecos_name(a:login), $NAME, s:capitalize(a:login)] if name != "" return name endif endfor endfunction function! s:gecos_name(login) for line in s:try_reading_file('/etc/passwd') if line =~ '^' . a:login . ':' return substitute(s:passwd_field(line, 5), '&', s:capitalize(a:login), "") endif endfor return "" endfunction function! s:try_reading_file(path) try return readfile(a:path) catch return [] endtry endfunction function! s:passwd_field(line, field) let fields = split(a:line, ':', 1) if len(fields) < field return "" endif return fields[field - 1] endfunction function! s:capitalize(word) return toupper(a:word[0]) . strpart(a:word, 1) endfunction function! s:hostname() return s:trimmed_system_with_default('hostname', 'localhost') endfunction " Format used for new date entries. if !exists('g:changelog_new_date_format') let g:changelog_new_date_format = "%d %u\n\n\t* %c\n\n" endif " Format used for new entries to current date entry. if !exists('g:changelog_new_entry_format') let g:changelog_new_entry_format = "\t* %c" endif " Regular expression used to find a given date entry. if !exists('g:changelog_date_entry_search') let g:changelog_date_entry_search = '^\s*%d\_s*%u' endif " Regular expression used to find the end of a date entry if !exists('g:changelog_date_end_entry_search') let g:changelog_date_end_entry_search = '^\s*$' endif " Substitutes specific items in new date-entry formats and search strings. " Can be done with substitute of course, but unclean, and need \@! then. function! s:substitute_items(str, date, user) let str = a:str let middles = {'%': '%', 'd': a:date, 'u': a:user, 'c': '{cursor}'} let i = stridx(str, '%') while i != -1 let inc = 0 if has_key(middles, str[i + 1]) let mid = middles[str[i + 1]] let str = strpart(str, 0, i) . mid . strpart(str, i + 2) let inc = strlen(mid) endif let i = stridx(str, '%', i + 1 + inc) endwhile return str endfunction " Position the cursor once we've done all the funky substitution. function! s:position_cursor() if search('{cursor}') > 0 let lnum = line('.') let line = getline(lnum) let cursor = stridx(line, '{cursor}') call setline(lnum, substitute(line, '{cursor}', '', '')) endif startinsert! endfunction " Internal function to create a new entry in the ChangeLog. function! s:new_changelog_entry() " Deal with 'paste' option. let save_paste = &paste let &paste = 1 call cursor(1, 1) " Look for an entry for today by our user. let date = strftime(g:changelog_dateformat) let search = s:substitute_items(g:changelog_date_entry_search, date, \ s:username()) if search(search) > 0 " Ok, now we look for the end of the date entry, and add an entry. call cursor(nextnonblank(line('.') + 1), 1) if search(g:changelog_date_end_entry_search, 'W') > 0 let p = (line('.') == line('$')) ? line('.') : line('.') - 1 else let p = line('.') endif let ls = split(s:substitute_items(g:changelog_new_entry_format, '', ''), \ '\n') call append(p, ls) call cursor(p + 1, 1) else " Flag for removing empty lines at end of new ChangeLogs. let remove_empty = line('$') == 1 " No entry today, so create a date-user header and insert an entry. let todays_entry = s:substitute_items(g:changelog_new_date_format, \ date, s:username()) " Make sure we have a cursor positioning. if stridx(todays_entry, '{cursor}') == -1 let todays_entry = todays_entry . '{cursor}' endif " Now do the work. call append(0, split(todays_entry, '\n')) " Remove empty lines at end of file. if remove_empty $-/^\s*$/-1,$delete endif " Reposition cursor once we're done. call cursor(1, 1) endif call s:position_cursor() " And reset 'paste' option let &paste = save_paste endfunction if exists(":NewChangelogEntry") != 2 noremap <buffer> <silent> <Leader>o <Esc>:call <SID>new_changelog_entry()<CR> command! -nargs=0 NewChangelogEntry call s:new_changelog_entry() endif let b:undo_ftplugin = "setl com< fo< et< ai<" setlocal comments= setlocal formatoptions+=t setlocal noexpandtab setlocal autoindent if &textwidth == 0 setlocal textwidth=78 let b:undo_ftplugin .= " tw<" endif let &cpo = s:cpo_save unlet s:cpo_save else let s:cpo_save = &cpo set cpo&vim " Add the Changelog opening mapping nnoremap <silent> <Leader>o :call <SID>open_changelog()<CR> function! s:open_changelog() let path = expand('%:p:h') if exists('b:changelog_path') let changelog = b:changelog_path else if exists('b:changelog_name') let name = b:changelog_name else let name = 'ChangeLog' endif while isdirectory(path) let changelog = path . '/' . name if filereadable(changelog) break endif let parent = substitute(path, '/\+[^/]*$', "", "") if path == parent break endif let path = parent endwhile endif if !filereadable(changelog) return endif if exists('b:changelog_entry_prefix') let prefix = call(b:changelog_entry_prefix, []) else let prefix = substitute(strpart(expand('%:p'), strlen(path)), '^/\+', "", "") . ':' endif if !empty(prefix) let prefix = ' ' . prefix endif let buf = bufnr(changelog) if buf != -1 if bufwinnr(buf) != -1 execute bufwinnr(buf) . 'wincmd w' else execute 'sbuffer' buf endif else execute 'split' fnameescape(changelog) endif call s:new_changelog_entry(prefix) endfunction let &cpo = s:cpo_save unlet s:cpo_save endif
zyz2011-vim
runtime/ftplugin/changelog.vim
Vim Script
gpl2
8,738
" Vim filetype plugin file " Language: pam(8) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/pamconf.vim
Vim Script
gpl2
421
" Vim filetype plugin file " Language: Perl 6 " Maintainer: Andy Lester <andy@petdance.com> " URL: http://github.com/petdance/vim-perl/tree/master " Last Change: 2012 Mar 11 " Contributors: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com> " " Based on ftplugin/perl.vim by Dan Sharp <dwsharp at hotmail dot com> if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C setlocal formatoptions+=crq setlocal comments=:# setlocal commentstring=#%s " Change the browse dialog on Win32 to show mainly Perl-related files if has("gui_win32") let b:browsefilter = "Perl Source Files (*.pl)\t*.pl\n" . \ "Perl Modules (*.pm)\t*.pm\n" . \ "Perl Documentation Files (*.pod)\t*.pod\n" . \ "All Files (*.*)\t*.*\n" endif " Provided by Ned Konz <ned at bike-nomad dot com> "--------------------------------------------- setlocal include=\\<\\(use\\\|require\\)\\> setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.pm','') setlocal define=[^A-Za-z_] " The following line changes a global variable but is necessary to make " gf and similar commands work. Thanks to Andrew Pimlott for pointing out " the problem. If this causes a " problem for you, add an " after/ftplugin/perl6.vim file that contains " set isfname-=: set isfname+=: " Undo the stuff we changed. let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isk<" . \ " | unlet! b:browsefilter" " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo
zyz2011-vim
runtime/ftplugin/perl6.vim
Vim Script
gpl2
1,652
" Vim filetype plugin file " Language: hosts_access(5) control file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/hostsaccess.vim
Vim Script
gpl2
424
" Vim filetype plugin file " Language: protocols(5) - Internet protocols definition file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/protocols.vim
Vim Script
gpl2
445
" Vim filetype plugin file " Language: CSS " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo< ofu<" setlocal comments=s1:/*,mb:*,ex:*/ commentstring& setlocal formatoptions-=t formatoptions+=croql setlocal omnifunc=csscomplete#CompleteCSS let &l:include = '^\s*@import\s\+\%(url(\)\=' let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/css.vim
Vim Script
gpl2
516
" Vim filetype plugin file " Language: pinfo(1) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/pinfo.vim
Vim Script
gpl2
423
" Vim filetype plugin file " Language: limits(5) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/limits.vim
Vim Script
gpl2
424
" Vim filetype plugin file " Language: Sieve filtering language input file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=s1:/*,mb:*,ex:*/,:# commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/sieve.vim
Vim Script
gpl2
457
" Vim filetype plugin file " Language: Automake " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let s:cpo_save = &cpo set cpo&vim runtime! ftplugin/make.vim ftplugin/make_*.vim ftplugin/make/*.vim let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/automake.vim
Vim Script
gpl2
325
" Vim filetype plugin file " Language: Kimwitu++ " Maintainer: Michael Piefel <entwurf@piefel.de> " Last Change: 10 March 2012 " Behaves almost like C++ runtime! ftplugin/cpp.vim ftplugin/cpp_*.vim ftplugin/cpp/*.vim let s:cpo_save = &cpo set cpo&vim " Limit the browser to related files if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "Kimwitu/Kimwitu++ Files (*.k)\t*.k\n" . \ "Lex/Flex Files (*.l)\t*.l\n" . \ "Yacc/Bison Files (*.y)\t*.y\n" . \ "All Files (*.*)\t*.*\n" endif " Set the errorformat for the Kimwitu++ compiler set efm+=kc%.%#:\ error\ at\ %f:%l:\ %m if exists("b:undo_ftplugin") let b:undo_ftplugin = b:undo_ftplugin . " | setlocal efm<" \ . "| unlet! b:browsefiler" else let b:undo_ftplugin = "setlocal efm<" \ . "| unlet! b:browsefiler" endif let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/kwt.vim
Vim Script
gpl2
851
" Vim filetype plugin file " Language: xslt " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim let b:did_ftplugin = 1 " Change the :browse e filter to primarily show xsd-related files. if has("gui_win32") && exists("b:browsefilter") let b:browsefilter="XSLT Files (*.xsl,*.xslt)\t*.xsl;*.xslt\n" . b:browsefilter endif
zyz2011-vim
runtime/ftplugin/xslt.vim
Vim Script
gpl2
539
" Vim filetype plugin file " Language: cvs(1) RC file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments= commentstring= formatoptions-=tcroql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/cvsrc.vim
Vim Script
gpl2
387
" filetype plugin for TeX and variants " Language: TeX (ft=initex) " Maintainer: Benji Fisher, Ph.D. <benji@member.AMS.org> " Version: 1.0 " Last Change: Wed 19 Apr 2006 " Only do this when not done yet for this buffer. if exists("b:did_ftplugin") finish endif " Don't load another plugin for this buffer. let b:did_ftplugin = 1 " Avoid problems if running in 'compatible' mode. let s:save_cpo = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< define< include< sua<" " Set 'comments' to format dashed lists in comments setlocal com=sO:%\ -,mO:%\ \ ,eO:%%,:% " Set 'commentstring' to recognize the % comment character: " (Thanks to Ajit Thakkar.) setlocal cms=%%s " Allow "[d" to be used to find a macro definition: let &l:define='\\\([egx]\|char\|mathchar\|count\|dimen\|muskip\|skip\|toks\)\=' \ . 'def\|\\font\|\\\(future\)\=let' " Tell Vim to recognize \input bar : let &l:include = '\\input' setlocal suffixesadd=.tex let &cpo = s:save_cpo unlet s:save_cpo " vim:sts=2:sw=2:
zyz2011-vim
runtime/ftplugin/initex.vim
Vim Script
gpl2
1,005
" Vim filetype plugin file " Language: aspvbs " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Last Changed: 20 Jan 2009 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo set cpo-=C " Define some defaults in case the included ftplugins don't set them. let s:undo_ftplugin = "" let s:browsefilter = "HTML Files (*.html, *.htm)\t*.htm*\n" . \ "All Files (*.*)\t*.*\n" let s:match_words = "" runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim let b:did_ftplugin = 1 " Override our defaults if these were set by an included ftplugin. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin endif if exists("b:browsefilter") let s:browsefilter = b:browsefilter endif if exists("b:match_words") let s:match_words = b:match_words endif " ASP: Active Server Pages (with Visual Basic Script) " thanks to Gontran BAERTS if exists("loaded_matchit") let s:notend = '\%(\<end\s\+\)\@<!' let b:match_ignorecase = 1 let b:match_words = \ s:notend . '\<if\>\%(.\{-}then\s\+\w\)\@!:\<elseif\>:^\s*\<else\>:\<end\s\+\<if\>,' . \ s:notend . '\<select\s\+case\>:\<case\>:\<case\s\+else\>:\<end\s\+select\>,' . \ '^\s*\<sub\>:\<end\s\+sub\>,' . \ '^\s*\<function\>:\<end\s\+function\>,' . \ '\<class\>:\<end\s\+class\>,' . \ '^\s*\<do\>:\<loop\>,' . \ '^\s*\<for\>:\<next\>,' . \ '\<while\>:\<wend\>,' . \ s:match_words endif " Change the :browse e filter to primarily show ASP-related files. if has("gui_win32") let b:browsefilter="ASP Files (*.asp)\t*.asp\n" . s:browsefilter endif let b:undo_ftplugin = "unlet! b:match_words b:match_ignorecase b:browsefilter | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo
zyz2011-vim
runtime/ftplugin/aspvbs.vim
Vim Script
gpl2
1,916
" Vim filetype plugin file " Language: mutt RC File " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-04-19 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql let &l:include = '^\s*source\>' let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/muttrc.vim
Vim Script
gpl2
455
" Vim filetype plugin file " Language: Zsh shell script " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2011-01-23 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let b:match_words = \ &matchpairs \ . ',\<if\>:\<elif\>:\<else\>:\<fi\>' \ . ',\<case\>:^\s*([^)]*):\<esac\>' \ . ',\<\%(select\|while\|until\|repeat\|for\%(each\)\=\)\>:\<done\>' let b:match_skip = 's:comment\|string\|heredoc\|subst' let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/zsh.vim
Vim Script
gpl2
674
" Created : Wed 26 Apr 2006 01:20:53 AM CDT " Modified : Fri 28 Apr 2006 03:24:01 AM CDT " Author : Gautam Iyer <gi1242@users.sourceforge.net> " Description : ftplugin for mrxvtrc if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let b:undo_ftplugin = "setl com< cms< fo<" " Really any line that does not match an option is a comment. But use '!' for " compatibility with x-defaults files, and "#" (preferred) for compatibility " with all other config files. " " Comments beginning with "#" are preferred because Vim will not flag the " first word as a spelling error if it is not capitalised. The '!' used as " comment leaders makes Vim think that every comment line is a new sentence. setlocal comments=:!,:# commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql
zyz2011-vim
runtime/ftplugin/mrxvtrc.vim
Vim Script
gpl2
798
" Vim filetype plugin file " Language: DocBook " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2012-04-25 if exists('b:did_ftplugin') finish endif if !exists('b:docbk_type') if expand('%:e') == 'sgml' let b:docbk_type = 'sgml' else let b:docbk_type = 'xml' endif endif if b:docbk_type == 'sgml' runtime! ftplugin/sgml.vim ftplugin/sgml_*.vim ftplugin/sgml/*.vim else runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim endif let b:undo_ftplugin = "unlet! b:docbk_type"
zyz2011-vim
runtime/ftplugin/docbk.vim
Vim Script
gpl2
530
" Vim filetype plugin file " Language: fetchmail(1) RC File " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/fetchmail.vim
Vim Script
gpl2
416
" Vim filetype plugin file " Language: elinks(1) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/elinks.vim
Vim Script
gpl2
424
" Vim filetype plugin file " Language: GNU Arch inventory file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/arch.vim
Vim Script
gpl2
419
" Vim filetype plugin file " Language: nanorc(5) - GNU nano configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/nanorc.vim
Vim Script
gpl2
435
" Vim filetype plugin file " Language: netrc(5) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/ftplugin/netrc.vim
Vim Script
gpl2
416
" These commands create the option window. " " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2012 Feb 22 " If there already is an option window, jump to that one. if bufwinnr("option-window") > 0 let s:thiswin = winnr() while 1 if @% == "option-window" finish endif wincmd w if s:thiswin == winnr() break endif endwhile endif " Make sure the '<' flag is not included in 'cpoptions', otherwise <CR> would " not be recognized. See ":help 'cpoptions'". let s:cpo_save = &cpo set cpo&vim " function to be called when <CR> is hit in the option-window fun! <SID>CR() " If on a continued comment line, go back to the first comment line let lnum = search("^[^\t]", 'bWcn') let line = getline(lnum) " <CR> on a "set" line executes the option line if match(line, "^ \tset ") >= 0 " For a local option: go to the previous window " If this is a help window, go to the window below it let thiswin = winnr() let local = <SID>Find(lnum) if local >= 0 exe line call <SID>Update(lnum, line, local, thiswin) endif " <CR> on a "option" line shows help for that option elseif match(line, "^[a-z]") >= 0 let name = substitute(line, '\([^\t]*\).*', '\1', "") exe "help '" . name . "'" " <CR> on an index line jumps to the group elseif match(line, '^ \=[0-9]') >= 0 exe "norm! /" . line . "\<CR>zt" endif endfun " function to be called when <Space> is hit in the option-window fun! <SID>Space() let lnum = line(".") let line = getline(lnum) " <Space> on a "set" line refreshes the option line if match(line, "^ \tset ") >= 0 " For a local option: go to the previous window " If this is a help window, go to the window below it let thiswin = winnr() let local = <SID>Find(lnum) if local >= 0 call <SID>Update(lnum, line, local, thiswin) endif endif endfun " find the window in which the option applies " returns 0 for global option, 1 for local option, -1 for error fun! <SID>Find(lnum) if getline(a:lnum - 1) =~ "(local to" let local = 1 let thiswin = winnr() wincmd p if exists("b:current_syntax") && b:current_syntax == "help" wincmd j if winnr() == thiswin wincmd j endif endif else let local = 0 endif if local && (winnr() == thiswin || (exists("b:current_syntax") \ && b:current_syntax == "help")) echo "Don't know in which window" let local = -1 endif return local endfun " Update a "set" line in the option window fun! <SID>Update(lnum, line, local, thiswin) " get the new value of the option and update the option window line if match(a:line, "=") >= 0 let name = substitute(a:line, '^ \tset \([^=]*\)=.*', '\1', "") else let name = substitute(a:line, '^ \tset \(no\)\=\([a-z]*\).*', '\2', "") endif if name == "pt" && &pt =~ "\x80" let val = <SID>PTvalue() else let val = escape(eval('&' . name), " \t\\\"|") endif if a:local exe a:thiswin . "wincmd w" endif if match(a:line, "=") >= 0 || (val != "0" && val != "1") call setline(a:lnum, " \tset " . name . "=" . val) else if val call setline(a:lnum, " \tset " . name . "\tno" . name) else call setline(a:lnum, " \tset no" . name . "\t" . name) endif endif set nomodified endfun " Reset 'title' and 'icon' to make it work faster. let s:old_title = &title let s:old_icon = &icon let s:old_sc = &sc let s:old_ru = &ru set notitle noicon nosc noru " If the current window is a help window, try finding a non-help window. " Relies on syntax highlighting to be switched on. let s:thiswin = winnr() while exists("b:current_syntax") && b:current_syntax == "help" wincmd w if s:thiswin == winnr() break endif endwhile " Open the window new option-window setlocal ts=15 tw=0 noro buftype=nofile " Insert help and a "set" command for each option. call append(0, '" Each "set" line shows the current value of an option (on the left).') call append(1, '" Hit <CR> on a "set" line to execute it.') call append(2, '" A boolean option will be toggled.') call append(3, '" For other options you can edit the value.') call append(4, '" Hit <CR> on a help line to open a help window on this option.') call append(5, '" Hit <CR> on an index line to jump there.') call append(6, '" Hit <Space> on a "set" line to refresh it.') " These functions are called often below. Keep them fast! " Init a local binary option fun! <SID>BinOptionL(name) let val = getwinvar(winnr('#'), '&' . a:name) call append("$", substitute(substitute(" \tset " . val . a:name . "\t" . \!val . a:name, "0", "no", ""), "1", "", "")) endfun " Init a global binary option fun! <SID>BinOptionG(name, val) call append("$", substitute(substitute(" \tset " . a:val . a:name . "\t" . \!a:val . a:name, "0", "no", ""), "1", "", "")) endfun " Init a local string option fun! <SID>OptionL(name) let val = escape(getwinvar(winnr('#'), '&' . a:name), " \t\\\"|") call append("$", " \tset " . a:name . "=" . val) endfun " Init a global string option fun! <SID>OptionG(name, val) call append("$", " \tset " . a:name . "=" . escape(a:val, " \t\\\"|")) endfun let s:idx = 1 let s:lnum = line("$") call append("$", "") fun! <SID>Header(text) let line = s:idx . " " . a:text if s:idx < 10 let line = " " . line endif call append("$", "") call append("$", line) call append("$", "") call append(s:lnum, line) let s:idx = s:idx + 1 let s:lnum = s:lnum + 1 endfun " Get the value of 'pastetoggle'. It could be a special key. fun! <SID>PTvalue() redir @a silent set pt redir END return substitute(@a, '[^=]*=\(.*\)', '\1', "") endfun " Restore the previous value of 'cpoptions' here, it's used below. let &cpo = s:cpo_save " List of all options, organized by function. " The text should be sufficient to know what the option is used for. call <SID>Header("important") call append("$", "compatible\tbehave very Vi compatible (not advisable)") call <SID>BinOptionG("cp", &cp) call append("$", "cpoptions\tlist of flags to specify Vi compatibility") call <SID>OptionG("cpo", &cpo) call append("$", "insertmode\tuse Insert mode as the default mode") call <SID>BinOptionG("im", &im) call append("$", "paste\tpaste mode, insert typed text literally") call <SID>BinOptionG("paste", &paste) call append("$", "pastetoggle\tkey sequence to toggle paste mode") if &pt =~ "\x80" call append("$", " \tset pt=" . <SID>PTvalue()) else call <SID>OptionG("pt", &pt) endif call append("$", "runtimepath\tlist of directories used for runtime files and plugins") call <SID>OptionG("rtp", &rtp) call append("$", "helpfile\tname of the main help file") call <SID>OptionG("hf", &hf) call <SID>Header("moving around, searching and patterns") call append("$", "whichwrap\tlist of flags specifying which commands wrap to another line") call append("$", "\t(local to window)") call <SID>OptionL("ww") call append("$", "startofline\tmany jump commands move the cursor to the first non-blank") call append("$", "\tcharacter of a line") call <SID>BinOptionG("sol", &sol) call append("$", "paragraphs\tnroff macro names that separate paragraphs") call <SID>OptionG("para", &para) call append("$", "sections\tnroff macro names that separate sections") call <SID>OptionG("sect", &sect) call append("$", "path\tlist of directory names used for file searching") call append("$", "\t(global or local to buffer)") call <SID>OptionG("pa", &pa) call append("$", "cdpath\tlist of directory names used for :cd") call <SID>OptionG("cd", &cd) if exists("+autochdir") call append("$", "autochdir\tchange to directory of file in buffer") call <SID>BinOptionG("acd", &acd) endif call append("$", "wrapscan\tsearch commands wrap around the end of the buffer") call <SID>BinOptionG("ws", &ws) call append("$", "incsearch\tshow match for partly typed search command") call <SID>BinOptionG("is", &is) call append("$", "magic\tchange the way backslashes are used in search patterns") call <SID>BinOptionG("magic", &magic) call append("$", "ignorecase\tignore case when using a search pattern") call <SID>BinOptionG("ic", &ic) call append("$", "smartcase\toverride 'ignorecase' when pattern has upper case characters") call <SID>BinOptionG("scs", &scs) call append("$", "casemap\twhat method to use for changing case of letters") call <SID>OptionG("cmp", &cmp) call append("$", "maxmempattern\tmaximum amount of memory in Kbyte used for pattern matching") call append("$", " \tset mmp=" . &mmp) call append("$", "define\tpattern for a macro definition line") call append("$", "\t(global or local to buffer)") call <SID>OptionG("def", &def) if has("find_in_path") call append("$", "include\tpattern for an include-file line") call append("$", "\t(local to buffer)") call <SID>OptionL("inc") call append("$", "includeexpr\texpression used to transform an include line to a file name") call append("$", "\t(local to buffer)") call <SID>OptionL("inex") endif call <SID>Header("tags") call append("$", "tagbsearch\tuse binary searching in tags files") call <SID>BinOptionG("tbs", &tbs) call append("$", "taglength\tnumber of significant characters in a tag name or zero") call append("$", " \tset tl=" . &tl) call append("$", "tags\tlist of file names to search for tags") call append("$", "\t(global or local to buffer)") call <SID>OptionG("tag", &tag) call append("$", "tagrelative\tfile names in a tags file are relative to the tags file") call <SID>BinOptionG("tr", &tr) call append("$", "tagstack\ta :tag command will use the tagstack") call <SID>BinOptionG("tgst", &tgst) call append("$", "showfulltag\twhen completing tags in Insert mode show more info") call <SID>BinOptionG("sft", &sft) if has("cscope") call append("$", "cscopeprg\tcommand for executing cscope") call <SID>OptionG("csprg", &csprg) call append("$", "cscopetag\tuse cscope for tag commands") call <SID>BinOptionG("cst", &cst) call append("$", "cscopetagorder\t0 or 1; the order in which \":cstag\" performs a search") call append("$", " \tset csto=" . &csto) call append("$", "cscopeverbose\tgive messages when adding a cscope database") call <SID>BinOptionG("csverb", &csverb) call append("$", "cscopepathcomp\thow many components of the path to show") call append("$", " \tset cspc=" . &cspc) call append("$", "cscopequickfix\twhen to open a quickfix window for cscope") call <SID>OptionG("csqf", &csqf) call append("$", "cscoperelative\tfile names in a cscope file are relative to that file") call <SID>BinOptionG("csre", &csre) endif call <SID>Header("displaying text") call append("$", "scroll\tnumber of lines to scroll for CTRL-U and CTRL-D") call append("$", "\t(local to window)") call <SID>OptionL("scr") call append("$", "scrolloff\tnumber of screen lines to show around the cursor") call append("$", " \tset so=" . &so) call append("$", "wrap\tlong lines wrap") call <SID>BinOptionG("wrap", &wrap) call append("$", "linebreak\twrap long lines at a character in 'breakat'") call append("$", "\t(local to window)") call <SID>BinOptionL("lbr") call append("$", "breakat\twhich characters might cause a line break") call <SID>OptionG("brk", &brk) call append("$", "showbreak\tstring to put before wrapped screen lines") call <SID>OptionG("sbr", &sbr) call append("$", "sidescroll\tminimal number of columns to scroll horizontally") call append("$", " \tset ss=" . &ss) call append("$", "sidescrolloff\tminimal number of columns to keep left and right of the cursor") call append("$", " \tset siso=" . &siso) call append("$", "display\tinclude \"lastline\" to show the last line even if it doesn't fit") call append("$", "\tinclude \"uhex\" to show unprintable characters as a hex number") call <SID>OptionG("dy", &dy) call append("$", "fillchars\tcharacters to use for the status line, folds and filler lines") call <SID>OptionG("fcs", &fcs) call append("$", "cmdheight\tnumber of lines used for the command-line") call append("$", " \tset ch=" . &ch) call append("$", "columns\twidth of the display") call append("$", " \tset co=" . &co) call append("$", "lines\tnumber of lines in the display") call append("$", " \tset lines=" . &lines) call append("$", "window\tnumber of lines to scroll for CTRL-F and CTRL-B") call append("$", " \tset window=" . &window) call append("$", "lazyredraw\tdon't redraw while executing macros") call <SID>BinOptionG("lz", &lz) if has("reltime") call append("$", "redrawtime\ttimeout for 'hlsearch' and :match highlighting in msec") call append("$", " \tset rdt=" . &rdt) endif call append("$", "writedelay\tdelay in msec for each char written to the display") call append("$", "\t(for debugging)") call append("$", " \tset wd=" . &wd) call append("$", "list\tshow <Tab> as ^I and end-of-line as $") call append("$", "\t(local to window)") call <SID>BinOptionL("list") call append("$", "listchars\tlist of strings used for list mode") call <SID>OptionG("lcs", &lcs) call append("$", "number\tshow the line number for each line") call append("$", "\t(local to window)") call <SID>BinOptionL("nu") call append("$", "relativenumber\tshow the relative line number for each line") call append("$", "\t(local to window)") call <SID>BinOptionL("rnu") if has("linebreak") call append("$", "numberwidth\tnumber of columns to use for the line number") call append("$", "\t(local to window)") call <SID>OptionL("nuw") endif if has("conceal") call append("$", "conceallevel\tcontrols whether concealable text is hidden") call append("$", "\t(local to window)") call <SID>OptionL("cole") call append("$", "concealcursor\tmodes in which text in the cursor line can be concealed") call append("$", "\t(local to window)") call <SID>OptionL("cocu") endif call <SID>Header("syntax, highlighting and spelling") call append("$", "background\t\"dark\" or \"light\"; the background color brightness") call <SID>OptionG("bg", &bg) if has("autocmd") call append("$", "filetype\ttype of file; triggers the FileType event when set") call append("$", "\t(local to buffer)") call <SID>OptionL("ft") endif if has("syntax") call append("$", "syntax\tname of syntax highlighting used") call append("$", "\t(local to buffer)") call <SID>OptionL("syn") call append("$", "synmaxcol\tmaximum column to look for syntax items") call append("$", "\t(local to buffer)") call <SID>OptionL("smc") endif call append("$", "highlight\twhich highlighting to use for various occasions") call <SID>OptionG("hl", &hl) call append("$", "hlsearch\thighlight all matches for the last used search pattern") call <SID>BinOptionG("hls", &hls) if has("syntax") call append("$", "cursorcolumn\thighlight the screen column of the cursor") call append("$", "\t(local to window)") call <SID>BinOptionL("cuc") call append("$", "cursorline\thighlight the screen line of the cursor") call append("$", "\t(local to window)") call <SID>BinOptionL("cul") call append("$", "colorcolumn\tcolumns to highlight") call append("$", "\t(local to window)") call <SID>OptionL("cc") call append("$", "spell\thighlight spelling mistakes") call append("$", "\t(local to window)") call <SID>BinOptionL("spell") call append("$", "spelllang\tlist of accepted languages") call append("$", "\t(local to buffer)") call <SID>OptionL("spl") call append("$", "spellfile\tfile that \"zg\" adds good words to") call append("$", "\t(local to buffer)") call <SID>OptionL("spf") call append("$", "spellcapcheck\tpattern to locate the end of a sentence") call append("$", "\t(local to buffer)") call <SID>OptionL("spc") call append("$", "spellsuggest\tmethods used to suggest corrections") call <SID>OptionG("sps", &sps) call append("$", "mkspellmem\tamount of memory used by :mkspell before compressing") call <SID>OptionG("msm", &msm) endif call <SID>Header("multiple windows") call append("$", "laststatus\t0, 1 or 2; when to use a status line for the last window") call append("$", " \tset ls=" . &ls) if has("statusline") call append("$", "statusline\talternate format to be used for a status line") call <SID>OptionG("stl", &stl) endif call append("$", "equalalways\tmake all windows the same size when adding/removing windows") call <SID>BinOptionG("ea", &ea) if has("vertsplit") call append("$", "eadirection\tin which direction 'equalalways' works: \"ver\", \"hor\" or \"both\"") call <SID>OptionG("ead", &ead) endif call append("$", "winheight\tminimal number of lines used for the current window") call append("$", " \tset wh=" . &wh) call append("$", "winminheight\tminimal number of lines used for any window") call append("$", " \tset wmh=" . &wmh) call append("$", "winfixheight\tkeep the height of the window") call append("$", "\t(local to window)") call <SID>BinOptionL("wfh") if has("vertsplit") call append("$", "winfixwidth\tkeep the width of the window") call append("$", "\t(local to window)") call <SID>BinOptionL("wfw") call append("$", "winwidth\tminimal number of columns used for the current window") call append("$", " \tset wiw=" . &wiw) call append("$", "winminwidth\tminimal number of columns used for any window") call append("$", " \tset wmw=" . &wmw) endif call append("$", "helpheight\tinitial height of the help window") call append("$", " \tset hh=" . &hh) if has("quickfix") call append("$", "previewheight\tdefault height for the preview window") call append("$", " \tset pvh=" . &pvh) call append("$", "previewwindow\tidentifies the preview window") call append("$", "\t(local to window)") call <SID>BinOptionL("pvw") endif call append("$", "hidden\tdon't unload a buffer when no longer shown in a window") call <SID>BinOptionG("hid", &hid) call append("$", "switchbuf\t\"useopen\" and/or \"split\"; which window to use when jumping") call append("$", "\tto a buffer") call <SID>OptionG("swb", &swb) call append("$", "splitbelow\ta new window is put below the current one") call <SID>BinOptionG("sb", &sb) if has("vertsplit") call append("$", "splitright\ta new window is put right of the current one") call <SID>BinOptionG("spr", &spr) endif if has("scrollbind") call append("$", "scrollbind\tthis window scrolls together with other bound windows") call append("$", "\t(local to window)") call <SID>BinOptionL("scb") call append("$", "scrollopt\t\"ver\", \"hor\" and/or \"jump\"; list of options for 'scrollbind'") call <SID>OptionG("sbo", &sbo) endif if has("cursorbind") call append("$", "cursorbind\tthis window's cursor moves together with other bound windows") call append("$", "\t(local to window)") call <SID>BinOptionL("crb") endif call <SID>Header("multiple tab pages") call append("$", "showtabline\t0, 1 or 2; when to use a tab pages line") call append("$", " \tset stal=" . &stal) call append("$", "tabpagemax\tmaximum number of tab pages to open for -p and \"tab all\"") call append("$", " \tset tpm=" . &tpm) call append("$", "tabline\tcustom tab pages line") call <SID>OptionG("tal", &tal) if has("gui") call append("$", "guitablabel\tcustom tab page label for the GUI") call <SID>OptionG("gtl", &gtl) call append("$", "guitabtooltip\tcustom tab page tooltip for the GUI") call <SID>OptionG("gtt", &gtt) endif call <SID>Header("terminal") call append("$", "term\tname of the used terminal") call <SID>OptionG("term", &term) call append("$", "ttytype\talias for 'term'") call <SID>OptionG("tty", &tty) call append("$", "ttybuiltin\tcheck built-in termcaps first") call <SID>BinOptionG("tbi", &tbi) call append("$", "ttyfast\tterminal connection is fast") call <SID>BinOptionG("tf", &tf) call append("$", "weirdinvert\tterminal that requires extra redrawing") call <SID>BinOptionG("wiv", &wiv) call append("$", "esckeys\trecognize keys that start with <Esc> in Insert mode") call <SID>BinOptionG("ek", &ek) call append("$", "scrolljump\tminimal number of lines to scroll at a time") call append("$", " \tset sj=" . &sj) call append("$", "ttyscroll\tmaximum number of lines to use scrolling instead of redrawing") call append("$", " \tset tsl=" . &tsl) if has("gui") || has("msdos") || has("win32") call append("$", "guicursor\tspecifies what the cursor looks like in different modes") call <SID>OptionG("gcr", &gcr) endif if has("title") let &title = s:old_title call append("$", "title\tshow info in the window title") call <SID>BinOptionG("title", &title) set notitle call append("$", "titlelen\tpercentage of 'columns' used for the window title") call append("$", " \tset titlelen=" . &titlelen) call append("$", "titlestring\twhen not empty, string to be used for the window title") call <SID>OptionG("titlestring", &titlestring) call append("$", "titleold\tstring to restore the title to when exiting Vim") call <SID>OptionG("titleold", &titleold) let &icon = s:old_icon call append("$", "icon\tset the text of the icon for this window") call <SID>BinOptionG("icon", &icon) set noicon call append("$", "iconstring\twhen not empty, text for the icon of this window") call <SID>OptionG("iconstring", &iconstring) endif if has("win32") call append("$", "restorescreen\trestore the screen contents when exiting Vim") call <SID>BinOptionG("rs", &rs) endif call <SID>Header("using the mouse") call append("$", "mouse\tlist of flags for using the mouse") call <SID>OptionG("mouse", &mouse) if has("gui") call append("$", "mousefocus\tthe window with the mouse pointer becomes the current one") call <SID>BinOptionG("mousef", &mousef) call append("$", "mousehide\thide the mouse pointer while typing") call <SID>BinOptionG("mh", &mh) endif call append("$", "mousemodel\t\"extend\", \"popup\" or \"popup_setpos\"; what the right") call append("$", "\tmouse button is used for") call <SID>OptionG("mousem", &mousem) call append("$", "mousetime\tmaximum time in msec to recognize a double-click") call append("$", " \tset mouset=" . &mouset) call append("$", "ttymouse\t\"xterm\", \"xterm2\", \"dec\" or \"netterm\"; type of mouse") call <SID>OptionG("ttym", &ttym) if has("mouseshape") call append("$", "mouseshape\twhat the mouse pointer looks like in different modes") call <SID>OptionG("mouses", &mouses) endif if has("gui") call <SID>Header("GUI") call append("$", "guifont\tlist of font names to be used in the GUI") call <SID>OptionG("gfn", &gfn) if has("xfontset") call append("$", "guifontset\tpair of fonts to be used, for multibyte editing") call <SID>OptionG("gfs", &gfs) endif call append("$", "guifontwide\tlist of font names to be used for double-wide characters") call <SID>OptionG("gfw", &gfw) if has("mac") call append("$", "antialias\tuse smooth, antialiased fonts") call <SID>BinOptionG("anti", &anti) endif call append("$", "guioptions\tlist of flags that specify how the GUI works") call <SID>OptionG("go", &go) if has("gui_gtk") call append("$", "toolbar\t\"icons\", \"text\" and/or \"tooltips\"; how to show the toolbar") call <SID>OptionG("tb", &tb) if has("gui_gtk2") call append("$", "toolbariconsize\tsize of toolbar icons") call <SID>OptionG("tbis", &tbis) endif call append("$", "guiheadroom\troom (in pixels) left above/below the window") call append("$", " \tset ghr=" . &ghr) endif call append("$", "guipty\tuse a pseudo-tty for I/O to external commands") call <SID>BinOptionG("guipty", &guipty) if has("browse") call append("$", "browsedir\t\"last\", \"buffer\" or \"current\": which directory used for the file browser") call <SID>OptionG("bsdir", &bsdir) endif if has("multi_lang") call append("$", "langmenu\tlanguage to be used for the menus") call <SID>OptionG("langmenu", &lm) endif call append("$", "menuitems\tmaximum number of items in one menu") call append("$", " \tset mis=" . &mis) if has("winaltkeys") call append("$", "winaltkeys\t\"no\", \"yes\" or \"menu\"; how to use the ALT key") call <SID>OptionG("wak", &wak) endif call append("$", "linespace\tnumber of pixel lines to use between characters") call append("$", " \tset lsp=" . &lsp) if has("balloon_eval") call append("$", "balloondelay\tdelay in milliseconds before a balloon may pop up") call append("$", " \tset bdlay=" . &bdlay) call append("$", "ballooneval\twhether the balloon evaluation is to be used") call <SID>BinOptionG("beval", &beval) if has("eval") call append("$", "balloonexpr\texpression to show in balloon eval") call append("$", " \tset bexpr=" . &bexpr) endif endif if exists("+macatsui") call append("$", "macatsui\tuse ATSUI text drawing; disable to avoid display problems") call <SID>OptionG("macatsui", &macatsui) endif endif if has("printer") call <SID>Header("printing") call append("$", "printoptions\tlist of items that control the format of :hardcopy output") call <SID>OptionG("popt", &popt) call append("$", "printdevice\tname of the printer to be used for :hardcopy") call <SID>OptionG("pdev", &pdev) if has("postscript") call append("$", "printexpr\texpression used to print the PostScript file for :hardcopy") call <SID>OptionG("pexpr", &pexpr) endif call append("$", "printfont\tname of the font to be used for :hardcopy") call <SID>OptionG("pfn", &pfn) call append("$", "printheader\tformat of the header used for :hardcopy") call <SID>OptionG("pheader", &pheader) if has("postscript") call append("$", "printencoding\tencoding used to print the PostScript file for :hardcopy") call <SID>OptionG("penc", &penc) endif if has("multi_byte") call append("$", "printmbcharset\tthe CJK character set to be used for CJK output from :hardcopy") call <SID>OptionG("pmbcs", &pmbcs) call append("$", "printmbfont\tlist of font names to be used for CJK output from :hardcopy") call <SID>OptionG("pmbfn", &pmbfn) endif endif call <SID>Header("messages and info") call append("$", "terse\tadd 's' flag in 'shortmess' (don't show search message)") call <SID>BinOptionG("terse", &terse) call append("$", "shortmess\tlist of flags to make messages shorter") call <SID>OptionG("shm", &shm) call append("$", "showcmd\tshow (partial) command keys in the status line") let &sc = s:old_sc call <SID>BinOptionG("sc", &sc) set nosc call append("$", "showmode\tdisplay the current mode in the status line") call <SID>BinOptionG("smd", &smd) call append("$", "ruler\tshow cursor position below each window") let &ru = s:old_ru call <SID>BinOptionG("ru", &ru) set noru if has("statusline") call append("$", "rulerformat\talternate format to be used for the ruler") call <SID>OptionG("ruf", &ruf) endif call append("$", "report\tthreshold for reporting number of changed lines") call append("$", " \tset report=" . &report) call append("$", "verbose\tthe higher the more messages are given") call append("$", " \tset vbs=" . &vbs) call append("$", "verbosefile\tfile to write messages in") call <SID>OptionG("vfile", &vfile) call append("$", "more\tpause listings when the screen is full") call <SID>BinOptionG("more", &more) if has("dialog_con") || has("dialog_gui") call append("$", "confirm\tstart a dialog when a command fails") call <SID>BinOptionG("cf", &cf) endif call append("$", "errorbells\tring the bell for error messages") call <SID>BinOptionG("eb", &eb) call append("$", "visualbell\tuse a visual bell instead of beeping") call <SID>BinOptionG("vb", &vb) if has("multi_lang") call append("$", "helplang\tlist of preferred languages for finding help") call <SID>OptionG("hlg", &hlg) endif call <SID>Header("selecting text") call append("$", "selection\t\"old\", \"inclusive\" or \"exclusive\"; how selecting text behaves") call <SID>OptionG("sel", &sel) call append("$", "selectmode\t\"mouse\", \"key\" and/or \"cmd\"; when to start Select mode") call append("$", "\tinstead of Visual mode") call <SID>OptionG("slm", &slm) if has("clipboard") call append("$", "clipboard\t\"unnamed\" to use the * register like unnamed register") call append("$", "\t\"autoselect\" to always put selected text on the clipboard") call <SID>OptionG("cb", &cb) endif call append("$", "keymodel\t\"startsel\" and/or \"stopsel\"; what special keys can do") call <SID>OptionG("km", &km) call <SID>Header("editing text") call append("$", "undolevels\tmaximum number of changes that can be undone") call append("$", " \tset ul=" . &ul) call append("$", "undoreload\tmaximum number lines to save for undo on a buffer reload") call append("$", " \tset ur=" . &ur) call append("$", "modified\tchanges have been made and not written to a file") call append("$", "\t(local to buffer)") call <SID>BinOptionL("mod") call append("$", "readonly\tbuffer is not to be written") call append("$", "\t(local to buffer)") call <SID>BinOptionL("ro") call append("$", "modifiable\tchanges to the text are not possible") call append("$", "\t(local to buffer)") call <SID>BinOptionL("ma") call append("$", "textwidth\tline length above which to break a line") call append("$", "\t(local to buffer)") call <SID>OptionL("tw") call append("$", "wrapmargin\tmargin from the right in which to break a line") call append("$", "\t(local to buffer)") call <SID>OptionL("wm") call append("$", "backspace\tspecifies what <BS>, CTRL-W, etc. can do in Insert mode") call append("$", " \tset bs=" . &bs) call append("$", "comments\tdefinition of what comment lines look like") call append("$", "\t(local to buffer)") call <SID>OptionL("com") call append("$", "formatoptions\tlist of flags that tell how automatic formatting works") call append("$", "\t(local to buffer)") call <SID>OptionL("fo") call append("$", "formatlistpat\tpattern to recognize a numbered list") call append("$", "\t(local to buffer)") call <SID>OptionL("flp") if has("eval") call append("$", "formatexpr\texpression used for \"gq\" to format lines") call append("$", "\t(local to buffer)") call <SID>OptionL("fex") endif if has("insert_expand") call append("$", "complete\tspecifies how Insert mode completion works for CTRL-N and CTRL-P") call append("$", "\t(local to buffer)") call <SID>OptionL("cpt") call append("$", "completeopt\twhether to use a popup menu for Insert mode completion") call <SID>OptionG("cot", &cot) call append("$", "pumheight\tmaximum height of the popup menu") call <SID>OptionG("ph", &ph) call append("$", "completefunc\tuser defined function for Insert mode completion") call append("$", "\t(local to buffer)") call <SID>OptionL("cfu") call append("$", "omnifunc\tfunction for filetype-specific Insert mode completion") call append("$", "\t(local to buffer)") call <SID>OptionL("ofu") call append("$", "dictionary\tlist of dictionary files for keyword completion") call append("$", "\t(global or local to buffer)") call <SID>OptionG("dict", &dict) call append("$", "thesaurus\tlist of thesaurus files for keyword completion") call append("$", "\t(global or local to buffer)") call <SID>OptionG("tsr", &tsr) endif call append("$", "infercase\tadjust case of a keyword completion match") call append("$", "\t(local to buffer)") call <SID>BinOptionL("inf") if has("digraphs") call append("$", "digraph\tenable entering digraps with c1 <BS> c2") call <SID>BinOptionG("dg", &dg) endif call append("$", "tildeop\tthe \"~\" command behaves like an operator") call <SID>BinOptionG("top", &top) call append("$", "operatorfunc\tfunction called for the\"g@\" operator") call <SID>OptionG("opfunc", &opfunc) call append("$", "showmatch\twhen inserting a bracket, briefly jump to its match") call <SID>BinOptionG("sm", &sm) call append("$", "matchtime\ttenth of a second to show a match for 'showmatch'") call append("$", " \tset mat=" . &mat) call append("$", "matchpairs\tlist of pairs that match for the \"%\" command") call append("$", "\t(local to buffer)") call <SID>OptionL("mps") call append("$", "joinspaces\tuse two spaces after '.' when joining a line") call <SID>BinOptionG("js", &js) call append("$", "nrformats\t\"alpha\", \"octal\" and/or \"hex\"; number formats recognized for") call append("$", "\tCTRL-A and CTRL-X commands") call append("$", "\t(local to buffer)") call <SID>OptionL("nf") call <SID>Header("tabs and indenting") call append("$", "tabstop\tnumber of spaces a <Tab> in the text stands for") call append("$", "\t(local to buffer)") call <SID>OptionL("ts") call append("$", "shiftwidth\tnumber of spaces used for each step of (auto)indent") call append("$", "\t(local to buffer)") call <SID>OptionL("sw") call append("$", "smarttab\ta <Tab> in an indent inserts 'shiftwidth' spaces") call <SID>BinOptionG("sta", &sta) call append("$", "softtabstop\tif non-zero, number of spaces to insert for a <Tab>") call append("$", "\t(local to buffer)") call <SID>OptionL("sts") call append("$", "shiftround\tround to 'shiftwidth' for \"<<\" and \">>\"") call <SID>BinOptionG("sr", &sr) call append("$", "expandtab\texpand <Tab> to spaces in Insert mode") call append("$", "\t(local to buffer)") call <SID>BinOptionL("et") call append("$", "autoindent\tautomatically set the indent of a new line") call append("$", "\t(local to buffer)") call <SID>BinOptionL("ai") if has("smartindent") call append("$", "smartindent\tdo clever autoindenting") call append("$", "\t(local to buffer)") call <SID>BinOptionL("si") endif if has("cindent") call append("$", "cindent\tenable specific indenting for C code") call append("$", "\t(local to buffer)") call <SID>BinOptionL("cin") call append("$", "cinoptions\toptions for C-indenting") call append("$", "\t(local to buffer)") call <SID>OptionL("cino") call append("$", "cinkeys\tkeys that trigger C-indenting in Insert mode") call append("$", "\t(local to buffer)") call <SID>OptionL("cink") call append("$", "cinwords\tlist of words that cause more C-indent") call append("$", "\t(local to buffer)") call <SID>OptionL("cinw") call append("$", "indentexpr\texpression used to obtain the indent of a line") call append("$", "\t(local to buffer)") call <SID>OptionL("inde") call append("$", "indentkeys\tkeys that trigger indenting with 'indentexpr' in Insert mode") call append("$", "\t(local to buffer)") call <SID>OptionL("indk") endif call append("$", "copyindent\tcopy whitespace for indenting from previous line") call append("$", "\t(local to buffer)") call <SID>BinOptionL("ci") call append("$", "preserveindent\tpreserve kind of whitespace when changing indent") call append("$", "\t(local to buffer)") call <SID>BinOptionL("pi") if has("lispindent") call append("$", "lisp\tenable lisp mode") call append("$", "\t(local to buffer)") call <SID>BinOptionL("lisp") call append("$", "lispwords\twords that change how lisp indenting works") call <SID>OptionG("lw", &lw) endif if has("folding") call <SID>Header("folding") call append("$", "foldenable\tset to display all folds open") call append("$", "\t(local to window)") call <SID>BinOptionL("fen") call append("$", "foldlevel\tfolds with a level higher than this number will be closed") call append("$", "\t(local to window)") call <SID>OptionL("fdl") call append("$", "foldlevelstart\tvalue for 'foldlevel' when starting to edit a file") call append("$", " \tset fdls=" . &fdls) call append("$", "foldcolumn\twidth of the column used to indicate folds") call append("$", "\t(local to window)") call <SID>OptionL("fdc") call append("$", "foldtext\texpression used to display the text of a closed fold") call append("$", "\t(local to window)") call <SID>OptionL("fdt") call append("$", "foldclose\tset to \"all\" to close a fold when the cursor leaves it") call <SID>OptionG("fcl", &fcl) call append("$", "foldopen\tspecifies for which commands a fold will be opened") call <SID>OptionG("fdo", &fdo) call append("$", "foldminlines\tminimum number of screen lines for a fold to be closed") call append("$", "\t(local to window)") call <SID>OptionL("fml") call append("$", "commentstring\ttemplate for comments; used to put the marker in") call <SID>OptionL("cms") call append("$", "foldmethod\tfolding type: \"manual\", \"indent\", \"expr\", \"marker\" or \"syntax\"") call append("$", "\t(local to window)") call <SID>OptionL("fdm") call append("$", "foldexpr\texpression used when 'foldmethod' is \"expr\"") call append("$", "\t(local to window)") call <SID>OptionL("fde") call append("$", "foldignore\tused to ignore lines when 'foldmethod' is \"indent\"") call append("$", "\t(local to window)") call <SID>OptionL("fdi") call append("$", "foldmarker\tmarkers used when 'foldmethod' is \"marker\"") call append("$", "\t(local to window)") call <SID>OptionL("fmr") call append("$", "foldnestmax\tmaximum fold depth for when 'foldmethod is \"indent\" or \"syntax\"") call append("$", "\t(local to window)") call <SID>OptionL("fdn") endif if has("diff") call <SID>Header("diff mode") call append("$", "diff\tuse diff mode for the current window") call append("$", "\t(local to window)") call <SID>BinOptionL("diff") call append("$", "diffopt\toptions for using diff mode") call <SID>OptionG("dip", &dip) call append("$", "diffexpr\texpression used to obtain a diff file") call <SID>OptionG("dex", &dex) call append("$", "patchexpr\texpression used to patch a file") call <SID>OptionG("pex", &pex) endif call <SID>Header("mapping") call append("$", "maxmapdepth\tmaximum depth of mapping") call append("$", " \tset mmd=" . &mmd) call append("$", "remap\trecognize mappings in mapped keys") call <SID>BinOptionG("remap", &remap) call append("$", "timeout\tallow timing out halfway into a mapping") call <SID>BinOptionG("to", &to) call append("$", "ttimeout\tallow timing out halfway into a key code") call <SID>BinOptionG("ttimeout", &ttimeout) call append("$", "timeoutlen\ttime in msec for 'timeout'") call append("$", " \tset tm=" . &tm) call append("$", "ttimeoutlen\ttime in msec for 'ttimeout'") call append("$", " \tset ttm=" . &ttm) call <SID>Header("reading and writing files") call append("$", "modeline\tenable using settings from modelines when reading a file") call append("$", "\t(local to buffer)") call <SID>BinOptionL("ml") call append("$", "modelines\tnumber of lines to check for modelines") call append("$", " \tset mls=" . &mls) call append("$", "binary\tbinary file editing") call append("$", "\t(local to buffer)") call <SID>BinOptionL("bin") call append("$", "endofline\tlast line in the file has an end-of-line") call append("$", "\t(local to buffer)") call <SID>BinOptionL("eol") if has("multi_byte") call append("$", "bomb\tprepend a Byte Order Mark to the file") call append("$", "\t(local to buffer)") call <SID>BinOptionL("bomb") endif call append("$", "fileformat\tend-of-line format: \"dos\", \"unix\" or \"mac\"") call append("$", "\t(local to buffer)") call <SID>OptionL("ff") call append("$", "fileformats\tlist of file formats to look for when editing a file") call <SID>OptionG("ffs", &ffs) call append("$", "textmode\tobsolete, use 'fileformat'") call append("$", "\t(local to buffer)") call <SID>BinOptionL("tx") call append("$", "textauto\tobsolete, use 'fileformats'") call <SID>BinOptionG("ta", &ta) call append("$", "write\twriting files is allowed") call <SID>BinOptionG("write", &write) call append("$", "writebackup\twrite a backup file before overwriting a file") call <SID>BinOptionG("wb", &wb) call append("$", "backup\tkeep a backup after overwriting a file") call <SID>BinOptionG("bk", &bk) call append("$", "backupskip\tpatterns that specify for which files a backup is not made") call append("$", " \tset bsk=" . &bsk) call append("$", "backupcopy\twhether to make the backup as a copy or rename the existing file") call append("$", " \tset bkc=" . &bkc) call append("$", "backupdir\tlist of directories to put backup files in") call <SID>OptionG("bdir", &bdir) call append("$", "backupext\tfile name extension for the backup file") call <SID>OptionG("bex", &bex) call append("$", "autowrite\tautomatically write a file when leaving a modified buffer") call <SID>BinOptionG("aw", &aw) call append("$", "autowriteall\tas 'autowrite', but works with more commands") call <SID>BinOptionG("awa", &awa) call append("$", "writeany\talways write without asking for confirmation") call <SID>BinOptionG("wa", &wa) call append("$", "autoread\tautomatically read a file when it was modified outside of Vim") call append("$", "\t(global or local to buffer)") call <SID>BinOptionG("ar", &ar) call append("$", "patchmode\tkeep oldest version of a file; specifies file name extension") call <SID>OptionG("pm", &pm) call append("$", "fsync\tforcibly sync the file to disk after writing it") call <SID>BinOptionG("fs", &fs) if !has("msdos") call append("$", "shortname\tuse 8.3 file names") call append("$", "\t(local to buffer)") call <SID>BinOptionL("sn") endif call append("$", "cryptmethod\tencryption method for file writing: zip or blowfish") call append("$", "\t(local to buffer)") call <SID>OptionL("cm") call <SID>Header("the swap file") call append("$", "directory\tlist of directories for the swap file") call <SID>OptionG("dir", &dir) call append("$", "swapfile\tuse a swap file for this buffer") call append("$", "\t(local to buffer)") call <SID>BinOptionL("swf") call append("$", "swapsync\t\"sync\", \"fsync\" or empty; how to flush a swap file to disk") call <SID>OptionG("sws", &sws) call append("$", "updatecount\tnumber of characters typed to cause a swap file update") call append("$", " \tset uc=" . &uc) call append("$", "updatetime\ttime in msec after which the swap file will be updated") call append("$", " \tset ut=" . &ut) call append("$", "maxmem\tmaximum amount of memory in Kbyte used for one buffer") call append("$", " \tset mm=" . &mm) call append("$", "maxmemtot\tmaximum amount of memory in Kbyte used for all buffers") call append("$", " \tset mmt=" . &mmt) call <SID>Header("command line editing") call append("$", "history\thow many command lines are remembered ") call append("$", " \tset hi=" . &hi) call append("$", "wildchar\tkey that triggers command-line expansion") call append("$", " \tset wc=" . &wc) call append("$", "wildcharm\tlike 'wildchar' but can also be used in a mapping") call append("$", " \tset wcm=" . &wcm) call append("$", "wildmode\tspecifies how command line completion works") call <SID>OptionG("wim", &wim) if has("wildoptions") call append("$", "wildoptions\tempty or \"tagfile\" to list file name of matching tags") call <SID>OptionG("wop", &wop) endif call append("$", "suffixes\tlist of file name extensions that have a lower priority") call <SID>OptionG("su", &su) if has("file_in_path") call append("$", "suffixesadd\tlist of file name extensions added when searching for a file") call append("$", "\t(local to buffer)") call <SID>OptionL("sua") endif if has("wildignore") call append("$", "wildignore\tlist of patterns to ignore files for file name completion") call <SID>OptionG("wig", &wig) endif call append("$", "wildignorecase\tignore case when completing file names") call <SID>BinOptionG("wic", &wic) if has("wildmenu") call append("$", "wildmenu\tcommand-line completion shows a list of matches") call <SID>BinOptionG("wmnu", &wmnu) endif if has("vertsplit") call append("$", "cedit\tkey used to open the command-line window") call <SID>OptionG("cedit", &cedit) call append("$", "cmdwinheight\theight of the command-line window") call <SID>OptionG("cwh", &cwh) endif call append("$", "undofile\tautomatically save and restore undo history") call <SID>BinOptionG("udf", &udf) call append("$", "undodir\tlist of directories for undo files") call <SID>OptionG("udir", &udir) call <SID>Header("executing external commands") call append("$", "shell\tname of the shell program used for external commands") call <SID>OptionG("sh", &sh) if has("amiga") call append("$", "shelltype\twhen to use the shell or directly execute a command") call append("$", " \tset st=" . &st) endif call append("$", "shellquote\tcharacter(s) to enclose a shell command in") call <SID>OptionG("shq", &shq) call append("$", "shellxquote\tlike 'shellquote' but include the redirection") call <SID>OptionG("sxq", &sxq) call append("$", "shellxescape\tcharacters to escape when 'shellxquote' is (") call <SID>OptionG("sxe", &sxe) call append("$", "shellcmdflag\targument for 'shell' to execute a command") call <SID>OptionG("shcf", &shcf) call append("$", "shellredir\tused to redirect command output to a file") call <SID>OptionG("srr", &srr) call append("$", "shelltemp\tuse a temp file for shell commands instead of using a pipe") call <SID>BinOptionG("stmp", &stmp) call append("$", "equalprg\tprogram used for \"=\" command") call append("$", "\t(global or local to buffer)") call <SID>OptionG("ep", &ep) call append("$", "formatprg\tprogram used to format lines with \"gq\" command") call <SID>OptionG("fp", &fp) call append("$", "keywordprg\tprogram used for the \"K\" command") call <SID>OptionG("kp", &kp) call append("$", "warn\twarn when using a shell command and a buffer has changes") call <SID>BinOptionG("warn", &warn) if has("quickfix") call <SID>Header("running make and jumping to errors") call append("$", "errorfile\tname of the file that contains error messages") call <SID>OptionG("ef", &ef) call append("$", "errorformat\tlist of formats for error messages") call append("$", "\t(global or local to buffer)") call <SID>OptionG("efm", &efm) call append("$", "makeprg\tprogram used for the \":make\" command") call append("$", "\t(global or local to buffer)") call <SID>OptionG("mp", &mp) call append("$", "shellpipe\tstring used to put the output of \":make\" in the error file") call <SID>OptionG("sp", &sp) call append("$", "makeef\tname of the errorfile for the 'makeprg' command") call <SID>OptionG("mef", &mef) call append("$", "grepprg\tprogram used for the \":grep\" command") call append("$", "\t(global or local to buffer)") call <SID>OptionG("gp", &gp) call append("$", "grepformat\tlist of formats for output of 'grepprg'") call <SID>OptionG("gfm", &gfm) endif if has("msdos") || has("os2") || has("win16") || has("win32") || has("osfiletype") call <SID>Header("system specific") if has("msdos") call append("$", "bioskey\tcall the BIOS to get a keyoard character") call <SID>BinOptionG("biosk", &biosk) call append("$", "conskey\tuse direct console I/O to get a keyboard character") call <SID>BinOptionG("consk", &consk) endif if has("osfiletype") call append("$", "osfiletype\tOS-specific information about the type of file") call append("$", "\t(local to buffer)") call <SID>OptionL("oft") endif if has("msdos") || has("os2") || has("win16") || has("win32") call append("$", "shellslash\tuse forward slashes in file names; for Unix-like shells") call <SID>BinOptionG("ssl", &ssl) endif endif call <SID>Header("language specific") call append("$", "isfname\tspecifies the characters in a file name") call <SID>OptionG("isf", &isf) call append("$", "isident\tspecifies the characters in an identifier") call <SID>OptionG("isi", &isi) call append("$", "iskeyword\tspecifies the characters in a keyword") call append("$", "\t(local to buffer)") call <SID>OptionL("isk") call append("$", "isprint\tspecifies printable characters") call <SID>OptionG("isp", &isp) if has("textobjects") call append("$", "quoteescape\tspecifies escape characters in a string") call append("$", "\t(local to buffer)") call <SID>OptionL("qe") endif if has("rightleft") call append("$", "rightleft\tdisplay the buffer right-to-left") call append("$", "\t(local to window)") call <SID>BinOptionL("rl") call append("$", "rightleftcmd\twhen to edit the command-line right-to-left") call append("$", "\t(local to window)") call <SID>OptionL("rlc") call append("$", "revins\tinsert characters backwards") call <SID>BinOptionG("ri", &ri) call append("$", "allowrevins\tallow CTRL-_ in Insert and Command-line mode to toggle 'revins'") call <SID>BinOptionG("ari", &ari) call append("$", "aleph\tthe ASCII code for the first letter of the Hebrew alphabet") call append("$", " \tset al=" . &al) call append("$", "hkmap\tuse Hebrew keyboard mapping") call <SID>BinOptionG("hk", &hk) call append("$", "hkmapp\tuse phonetic Hebrew keyboard mapping") call <SID>BinOptionG("hkp", &hkp) endif if has("farsi") call append("$", "altkeymap\tuse Farsi as the second language when 'revins' is set") call <SID>BinOptionG("akm", &akm) call append("$", "fkmap\tuse Farsi keyboard mapping") call <SID>BinOptionG("fk", &fk) endif if has("arabic") call append("$", "arabic\tprepare for editing Arabic text") call append("$", "\t(local to window)") call <SID>BinOptionL("arab") call append("$", "arabicshape\tperform shaping of Arabic characters") call <SID>BinOptionG("arshape", &arshape) call append("$", "termbidi\tterminal will perform bidi handling") call <SID>BinOptionG("tbidi", &tbidi) endif if has("keymap") call append("$", "keymap\tname of a keyboard mappping") call <SID>OptionL("kmp") endif if has("langmap") call append("$", "langmap\ttranslate characters for Normal mode") call <SID>OptionG("lmap", &lmap) endif if has("xim") call append("$", "imdisable\twhen set never use IM; overrules following IM options") call <SID>BinOptionG("imd", &imd) endif call append("$", "iminsert\tin Insert mode: 1: use :lmap; 2: use IM; 0: neither") call append("$", "\t(local to window)") call <SID>OptionL("imi") call append("$", "imsearch\tentering a search pattern: 1: use :lmap; 2: use IM; 0: neither") call append("$", "\t(local to window)") call <SID>OptionL("ims") if has("xim") call append("$", "imcmdline\twhen set always use IM when starting to edit a command line") call <SID>BinOptionG("imc", &imc) endif if has("multi_byte") call <SID>Header("multi-byte characters") call append("$", "encoding\tcharacter encoding used in Vim: \"latin1\", \"utf-8\"") call append("$", "\t\"euc-jp\", \"big5\", etc.") call <SID>OptionG("enc", &enc) call append("$", "fileencoding\tcharacter encoding for the current file") call append("$", "\t(local to buffer)") call <SID>OptionL("fenc") call append("$", "fileencodings\tautomatically detected character encodings") call <SID>OptionG("fencs", &fencs) call append("$", "termencoding\tcharacter encoding used by the terminal") call <SID>OptionG("tenc", &tenc) call append("$", "charconvert\texpression used for character encoding conversion") call <SID>OptionG("ccv", &ccv) call append("$", "delcombine\tdelete combining (composing) characters on their own") call <SID>BinOptionG("deco", &deco) call append("$", "maxcombine\tmaximum number of combining (composing) characters displayed") call <SID>OptionG("mco", &mco) if has("xim") && has("gui_gtk") call append("$", "imactivatekey\tkey that activates the X input method") call <SID>OptionG("imak", &imak) endif call append("$", "ambiwidth\twidth of ambiguous width characters") call <SID>OptionG("ambw", &ambw) endif call <SID>Header("various") if has("virtualedit") call append("$", "virtualedit\twhen to use virtual editing: \"block\", \"insert\" and/or \"all\"") call <SID>OptionG("ve", &ve) endif if has("autocmd") call append("$", "eventignore\tlist of autocommand events which are to be ignored") call <SID>OptionG("ei", &ei) endif call append("$", "loadplugins\tload plugin scripts when starting up") call <SID>BinOptionG("lpl", &lpl) call append("$", "exrc\tenable reading .vimrc/.exrc/.gvimrc in the current directory") call <SID>BinOptionG("ex", &ex) call append("$", "secure\tsafer working with script files in the current directory") call <SID>BinOptionG("secure", &secure) call append("$", "gdefault\tuse the 'g' flag for \":substitute\"") call <SID>BinOptionG("gd", &gd) call append("$", "edcompatible\t'g' and 'c' flags of \":substitute\" toggle") call <SID>BinOptionG("ed", &ed) if exists("+opendevice") call append("$", "opendevice\tallow reading/writing devices") call <SID>BinOptionG("odev", &odev) endif if exists("+maxfuncdepth") call append("$", "maxfuncdepth\tmaximum depth of function calls") call append("$", " \tset mfd=" . &mfd) endif if has("mksession") call append("$", "sessionoptions\tlist of words that specifies what to put in a session file") call <SID>OptionG("ssop", &ssop) call append("$", "viewoptions\tlist of words that specifies what to save for :mkview") call <SID>OptionG("vop", &vop) call append("$", "viewdir\tdirectory where to store files with :mkview") call <SID>OptionG("vdir", &vdir) endif if has("viminfo") call append("$", "viminfo\tlist that specifies what to write in the viminfo file") call <SID>OptionG("vi", &vi) endif if has("quickfix") call append("$", "bufhidden\twhat happens with a buffer when it's no longer in a window") call append("$", "\t(local to buffer)") call <SID>OptionL("bh") call append("$", "buftype\t\"\", \"nofile\", \"nowrite\" or \"quickfix\": type of buffer") call append("$", "\t(local to buffer)") call <SID>OptionL("bt") endif call append("$", "buflisted\twhether the buffer shows up in the buffer list") call append("$", "\t(local to buffer)") call <SID>BinOptionL("bl") call append("$", "debug\tset to \"msg\" to see all error messages") call append("$", " \tset debug=" . &debug) if has("mzscheme") call append("$", "mzquantum\tinterval in milliseconds between polls for MzScheme threads") call append("$", " \tset mzq=" . &mzq) endif set cpo&vim " go to first line 1 " reset 'modified', so that ":q" can be used to close the window setlocal nomodified if has("syntax") " Use Vim highlighting, with some additional stuff setlocal ft=vim syn match optwinHeader "^ \=[0-9].*" syn match optwinName "^[a-z]*\t" nextgroup=optwinComment syn match optwinComment ".*" contained syn match optwinComment "^\t.*" if !exists("did_optwin_syntax_inits") let did_optwin_syntax_inits = 1 hi link optwinHeader Title hi link optwinName Identifier hi link optwinComment Comment endif endif " Install autocommands to enable mappings in option-window noremap <silent> <buffer> <CR> <C-\><C-N>:call <SID>CR()<CR> inoremap <silent> <buffer> <CR> <Esc>:call <SID>CR()<CR> noremap <silent> <buffer> <Space> :call <SID>Space()<CR> " Make the buffer be deleted when the window is closed. setlocal buftype=nofile bufhidden=delete noswapfile augroup optwin au! BufUnload,BufHidden option-window nested \ call <SID>unload() | delfun <SID>unload augroup END fun! <SID>unload() delfun <SID>CR delfun <SID>Space delfun <SID>Find delfun <SID>Update delfun <SID>OptionL delfun <SID>OptionG delfun <SID>BinOptionL delfun <SID>BinOptionG delfun <SID>Header au! optwin endfun " Restore the previous value of 'title' and 'icon'. let &title = s:old_title let &icon = s:old_icon let &ru = s:old_ru let &sc = s:old_sc let &cpo = s:cpo_save unlet s:old_title s:old_icon s:old_ru s:old_sc s:cpo_save s:idx s:lnum " vim: ts=8 sw=2 sts=2
zyz2011-vim
runtime/optwin.vim
Vim Script
gpl2
55,029
" Vim compiler file " Language: RSpec " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Last Change: 2009 Dec 22 " URL: http://vim-ruby.rubyforge.org " Anon CVS: See above site " Release Coordinator: Doug Kearns <dougkearns@gmail.com> if exists("current_compiler") finish endif let current_compiler = "rspec" if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif let s:cpo_save = &cpo set cpo-=C CompilerSet makeprg=spec CompilerSet errorformat= \%+W'%.%#'\ FAILED, \%+I'%.%#'\ FIXED, \%-Cexpected:%.%#, \%-C\ \ \ \ \ got:%.%#, \%E%.%#:in\ `load':\ %f:%l:%m, \%C%f:%l:, \%W%f:%l:\ warning:\ %m, \%E%f:%l:in\ %*[^:]:\ %m, \%E%f:%l:\ %m, \%-Z%\tfrom\ %f:%l, \%-Z%p^%.%#, \%-C%.%#, \%-G%.%# let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8:
zyz2011-vim
runtime/compiler/rspec.vim
Vim Script
gpl2
887
" Vim compiler file " Compiler: g77 (GNU Fortran) " Maintainer: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> " Last Change: $Date: 2004/06/13 18:17:36 $ " $Revision: 1.1 $ if exists("current_compiler") finish endif let current_compiler = "fortran_g77" if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif let s:cpo_save = &cpo set cpo-=C " Note: The errorformat assumes GNU make " sample multiline errors (besides gcc backend one-liners): " gev.f:14: " parameter UPLO = 'Upper-triangle' " ^ " Unsupported VXT statement at (^) " gev.f:6: " integer desca( * ), descb( * ) " 1 " gev.f:19: (continued): " end subroutine " 2 " Invalid declaration of or reference to symbol `desca' at (2) [initially seen at (1)] CompilerSet errorformat= \%Omake:\ %r, \%f:%l:\ warning:\ %m, \%A%f:%l:\ (continued):, \%W%f:%l:\ warning:, \%A%f:%l:\ , \%-C\ \ \ %p%*[0123456789^]%.%#, \%-C\ \ \ %.%#, \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', \%DMaking\ %*\\a\ in\ %f, \%Z%m let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/compiler/fortran_g77.vim
Vim Script
gpl2
1,149
" Vim compiler file " Compiler: HP aCC " Maintainer: Matthias Ulrich <matthias-ulrich@web.de> " URL: http://www.subhome.de/vim/hp_acc.vim " Last Change: 2012 Apr 30 " " aCC --version says: "HP ANSI C++ B3910B A.03.13" " This compiler has been tested on: " hp-ux 10.20, hp-ux 11.0 and hp-ux 11.11 (64bit) " " Tim Brown's aCC is: "HP ANSI C++ B3910B A.03.33" " and it also works fine... " " Now suggestions by aCC are supported (compile flag aCC +w). " Thanks to Tim Brown again!! " if exists("current_compiler") finish endif let current_compiler = "hp_acc" let s:keepcpo= &cpo set cpo&vim if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif CompilerSet errorformat=%A%trror\ %n\:\ \"%f\"\\,\ line\ %l\ \#\ %m, \%A%tarning\ (suggestion)\ %n\:\ \"%f\"\\,\ line\ %l\ \#\ %m\ %#, \%A%tarning\ %n\:\ \"%f\"\\,\ line\ %l\ \#\ %m\ %#, \%Z\ \ \ \ %p^%.%#, \%-C%.%# let &cpo = s:keepcpo unlet s:keepcpo " vim:ts=8:sw=4:cindent
zyz2011-vim
runtime/compiler/hp_acc.vim
Vim Script
gpl2
1,052
" Vim compiler file " Compiler: bcc - Borland C " Maintainer: Emile van Raaij (eraaij@xs4all.nl) " Last Change: 2004 Mar 27 if exists("current_compiler") finish endif let current_compiler = "bcc" if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif " A workable errorformat for Borland C CompilerSet errorformat=%*[^0-9]%n\ %f\ %l:\ %m " default make CompilerSet makeprg=make
zyz2011-vim
runtime/compiler/bcc.vim
Vim Script
gpl2
449
"------------------------------------------------------------------------------ " Description: Vim Ada/GNAT compiler file " Language: Ada (GNAT) " $Id: gnat.vim 887 2008-07-08 14:29:01Z krischik $ " Copyright: Copyright (C) 2006 Martin Krischik " Maintainer: Martin Krischi <krischik@users.sourceforge.net>k " Ned Okie <nokie@radford.edu> " $Author: krischik $ " $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ " Version: 4.6 " $Revision: 887 $ " $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/gnat.vim $ " History: 24.05.2006 MK Unified Headers " 16.07.2006 MK Ada-Mode as vim-ball " 15.10.2006 MK Bram's suggestion for runtime integration " 19.09.2007 NO use project file only when there is a project " Help Page: compiler-gnat "------------------------------------------------------------------------------ if (exists("current_compiler")&& current_compiler == "gnat") || version < 700 finish endif let s:keepcpo= &cpo set cpo&vim let current_compiler = "gnat" if !exists("g:gnat") let g:gnat = gnat#New () call ada#Map_Menu ( \ 'GNAT.Build', \ '<F7>', \ 'call gnat.Make ()') call ada#Map_Menu ( \ 'GNAT.Pretty Print', \ ':GnatPretty', \ 'call gnat.Pretty ()') call ada#Map_Menu ( \ 'GNAT.Tags', \ ':GnatTags', \ 'call gnat.Tags ()') call ada#Map_Menu ( \ 'GNAT.Find', \ ':GnatFind', \ 'call gnat.Find ()') call ada#Map_Menu ( \ 'GNAT.Set Projectfile\.\.\.', \ ':SetProject', \ 'call gnat.Set_Project_File ()') call g:gnat.Set_Session () endif if exists(":CompilerSet") != 2 " " plugin loaded by other means then the "compiler" command " command -nargs=* CompilerSet setlocal <args> endif execute "CompilerSet makeprg=" . escape (g:gnat.Get_Command('Make'), ' ') execute "CompilerSet errorformat=" . escape (g:gnat.Error_Format, ' ') let &cpo = s:keepcpo unlet s:keepcpo finish " 1}}} "------------------------------------------------------------------------------ " Copyright (C) 2006 Martin Krischik " " Vim is Charityware - see ":help license" or uganda.txt for licence details. "------------------------------------------------------------------------------ " vim: textwidth=0 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab " vim: foldmethod=marker
zyz2011-vim
runtime/compiler/gnat.vim
Vim Script
gpl2
2,418
" Vim compiler file " Compiler: icc - Intel C++ " Maintainer: Peter Puck <PtrPck@netscape.net> " Last Change: 2004 Mar 27 if exists("current_compiler") finish endif let current_compiler = "icc" if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif " I think that Intel is calling the compiler icl under Windows CompilerSet errorformat=%-Z%p^,%f(%l):\ remark\ #%n:%m,%f(%l)\ :\ (col.\ %c)\ remark:\ %m,%E%f(%l):\ error:\ %m,%E%f(%l):\ error:\ #%n:\ %m,%W%f(%l):\ warning\ #%n:\ %m,%W%f(%l):\ warning:\ %m,%-C%.%#
zyz2011-vim
runtime/compiler/icc.vim
Vim Script
gpl2
585
" Vim compiler file " Compiler: javac " Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au> " URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/javac.vim " Last Change: 2004 Nov 27 if exists("current_compiler") finish endif let current_compiler = "javac" if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif CompilerSet makeprg=javac CompilerSet errorformat=%E%f:%l:\ %m,%-Z%p^,%-C%.%#,%-G%.%#
zyz2011-vim
runtime/compiler/javac.vim
Vim Script
gpl2
486
" Vim compiler file " Compiler: SGI IRIX 6.5 MIPSPro C++ (CC) " Maintainer: David Harrison <david_jr@users.sourceforge.net> " Last Change: 2012 Apr 30 if exists("current_compiler") finish endif let current_compiler = "mipspro_cpp" let s:keepcpo= &cpo set cpo&vim if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif CompilerSet errorformat=%Ecc\-%n\ %.%#:\ ERROR\ File\ =\ %f\%\\,\ Line\ =\ %l, \%Wcc\-%n\ %.%#:\ WARNING\ File\ =\ %f\%\\,\ Line\ =\ %l, \%Icc\-%n\ %.%#:\ REMARK\ File\ =\ %f\%\\,\ Line\ =\ %l, \%+C\ \ %m., \%-Z\ \ %p^, \%-G\\s%#, \%-G%.%# let &cpo = s:keepcpo unlet s:keepcpo
zyz2011-vim
runtime/compiler/mipspro_cpp.vim
Vim Script
gpl2
701
" Vim compiler file " Compiler: FPC 2.1 " Maintainer: Jaroslaw Blasiok <jaro3000@o2.pl> " Last Change: 2005 October 07 if exists("current_compiler") finish endif let current_compiler = "fpc" if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif " NOTE: compiler must be runned with -vb to write whole source path, not only file " name. CompilerSet errorformat=%f(%l\\,%c)\ %m
zyz2011-vim
runtime/compiler/fpc.vim
Vim Script
gpl2
453
" Vim compiler file " Compiler: ATT dot " Maintainer: Marcos Macedo <bar4ka@bol.com.br> " Last Change: 2004 May 16 if exists("current_compiler") finish endif let current_compiler = "dot" if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif CompilerSet makeprg=dot\ -T$*\ \"%:p\"\ -o\ \"%:p:r.$*\"
zyz2011-vim
runtime/compiler/dot.vim
Vim Script
gpl2
372
" Vim Compiler File " Compiler: Modelsim Vcom " Maintainer: Paul Baleme <pbaleme@mail.com> " Last Change: September 8, 2003 " Thanks to: allanherriman@hotmail.com if exists("current_compiler") finish endif let current_compiler = "modelsim_vcom" if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif "setlocal errorformat=\*\*\ %tRROR:\ %f(%l):\ %m,%tRROR:\ %f(%l):\ %m,%tARNING\[%*[0-9]\]:\ %f(%l):\ %m,\*\*\ %tRROR:\ %m,%tRROR:\ %m,%tARNING\[%*[0-9]\]:\ %m "setlocal errorformat=%tRROR:\ %f(%l):\ %m,%tARNING\[%*[0-9]\]:\ %m CompilerSet errorformat=\*\*\ %tRROR:\ %f(%l):\ %m,\*\*\ %tRROR:\ %m,\*\*\ %tARNING:\ %m,\*\*\ %tOTE:\ %m,%tRROR:\ %f(%l):\ %m,%tARNING\[%*[0-9]\]:\ %f(%l):\ %m,%tRROR:\ %m,%tARNING\[%*[0-9]\]:\ %m
zyz2011-vim
runtime/compiler/modelsim_vcom.vim
Vim Script
gpl2
799
" Vim Compiler File " Compiler: ant " Maintainer: Johannes Zellner <johannes@zellner.org> " Last Change: Mi, 13 Apr 2005 22:50:07 CEST if exists("current_compiler") finish endif let current_compiler = "ant" if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif let s:cpo_save = &cpo set cpo&vim CompilerSet makeprg=ant " first line: " ant with jikes +E, which assumes the following " two property lines in your 'build.xml': " " <property name = "build.compiler" value = "jikes"/> " <property name = "build.compiler.emacs" value = "true"/> " " second line: " ant with javac " " note that this will work also for tasks like [wtkbuild] " CompilerSet errorformat=\ %#[%.%#]\ %#%f:%l:%v:%*\\d:%*\\d:\ %t%[%^:]%#:%m, \%A\ %#[%.%#]\ %f:%l:\ %m,%-Z\ %#[%.%#]\ %p^,%C\ %#[%.%#]\ %#%m " ,%-C%.%# let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/compiler/ant.vim
Vim Script
gpl2
941
" Vim compiler file " Compiler: Mono C# Compiler " Maintainer: Jarek Sobiecki <harijari@go2.pl> " Latest Revision: 2006-06-18 if exists("current_compiler") finish endif let current_compiler = "mcs" let s:cpo_save = &cpo set cpo-=C setlocal errorformat= \%E%f(%l\\,%c):\ error\ CS%n:%m, \%W%f(%l\\,%c):\ warning\ CS%n:%m, \%E%>syntax\ error\\,%m,%Z%f(%l\\,%c):\ error\ CS%n:%m, \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', \%DMaking\ %*\\a\ in\ %f, \%G-%.%# let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/compiler/mcs.vim
Vim Script
gpl2
613
" Vim compiler file " Compiler: tcl " Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au> " URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/tcl.vim " Last Change: 2004 Nov 27 if exists("current_compiler") finish endif let current_compiler = "tcl" if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif CompilerSet makeprg=tcl CompilerSet errorformat=%EError:\ %m,%+Z\ %\\{4}(file\ \"%f\"\ line\ %l),%-G%.%#
zyz2011-vim
runtime/compiler/tcl.vim
Vim Script
gpl2
492
" Vim compiler file " Compiler: Essential Lahey Fortran 90 " Probably also works for Lahey Fortran 90 " URL: http://www.unb.ca/chem/ajit/compiler/fortran_elf90.vim " Maintainer: Ajit J. Thakkar (ajit AT unb.ca); <http://www.unb.ca/chem/ajit/> " Version: 0.2 " Last Change: 2004 Mar 27 if exists("current_compiler") finish endif let current_compiler = "fortran_elf90" if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif let s:cposet=&cpoptions set cpoptions-=C CompilerSet errorformat=\%ALine\ %l\\,\ file\ %f, \%C%tARNING\ --%m, \%C%tATAL\ --%m, \%C%tBORT\ --%m, \%+C%\\l%.%#\., \%C%p\|, \%C%.%#, \%Z%$, \%-G%.%# CompilerSet makeprg=elf90 let &cpoptions=s:cposet unlet s:cposet
zyz2011-vim
runtime/compiler/fortran_elf90.vim
Vim Script
gpl2
802
" Vim compiler file " Compiler: BDF to PCF Conversion " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-04-19 if exists("current_compiler") finish endif let current_compiler = "bdf" let s:cpo_save = &cpo set cpo-=C setlocal makeprg=bdftopcf\ $* setlocal errorformat=%ABDF\ %trror\ on\ line\ %l:\ %m, \%-Z%p^, \%Cbdftopcf:\ bdf\ input\\,\ %f\\,\ corrupt, \%-G%.%# let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/compiler/bdf.vim
Vim Script
gpl2
461
" Vim compiler file " Compiler: Checkstyle " Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au> " URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/checkstyle.vim " Last Change: 2004 Nov 27 if exists("current_compiler") finish endif let current_compiler = "checkstyle" if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif CompilerSet makeprg=java\ com.puppycrawl.tools.checkstyle.Main\ -f\ plain " sample error: WebTable.java:282: '+=' is not preceeded with whitespace. " WebTable.java:201:1: '{' should be on the previous line. CompilerSet errorformat=%f:%l:\ %m,%f:%l:%v:\ %m,%-G%.%#
zyz2011-vim
runtime/compiler/checkstyle.vim
Vim Script
gpl2
673
" Vim compiler file " Compiler: PHP " Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au> " URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/php.vim " Last Change: 2004 Nov 27 if exists("current_compiler") finish endif let current_compiler = "php" if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif let s:cpo_save = &cpo set cpo-=C CompilerSet makeprg=php\ -lq CompilerSet errorformat=%E<b>Parse\ error</b>:\ %m\ in\ <b>%f</b>\ on\ line\ <b>%l</b><br\ />, \%W<b>Notice</b>:\ %m\ in\ <b>%f</b>\ on\ line\ <b>%l</b><br\ />, \%EParse\ error:\ %m\ in\ %f\ on\ line\ %l, \%WNotice:\ %m\ in\ %f</b>\ on\ line\ %l, \%-G%.%# let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/compiler/php.vim
Vim Script
gpl2
782
" Vim compiler file " Compiler: reStructuredText Documentation Format " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-04-19 if exists("current_compiler") finish endif let current_compiler = "rst" let s:cpo_save = &cpo set cpo&vim setlocal errorformat= \%f:%l:\ (%tEBUG/0)\ %m, \%f:%l:\ (%tNFO/1)\ %m, \%f:%l:\ (%tARNING/2)\ %m, \%f:%l:\ (%tRROR/3)\ %m, \%f:%l:\ (%tEVERE/3)\ %m, \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', \%DMaking\ %*\\a\ in\ %f let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/compiler/rst.vim
Vim Script
gpl2
622
" Vim compiler file " Compiler: SGI IRIX 6.5 MIPS C (cc) " Maintainer: David Harrison <david_jr@users.sourceforge.net> " Last Change: 2012 Apr 30 if exists("current_compiler") finish endif let current_compiler = "mips_c" let s:keepcpo= &cpo set cpo&vim if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif CompilerSet errorformat=%Ecc\-%n\ %.%#:\ ERROR\ File\ =\ %f\%\\,\ Line\ =\ %l, \%Wcc\-%n\ %.%#:\ WARNING\ File\ =\ %f\%\\,\ Line\ =\ %l, \%Icc\-%n\ %.%#:\ REMARK\ File\ =\ %f\%\\,\ Line\ =\ %l, \%+C\ \ %m., \%-Z\ \ %p^, \%-G\\s%#, \%-G%.%# let &cpo = s:keepcpo unlet s:keepcpo
zyz2011-vim
runtime/compiler/mips_c.vim
Vim Script
gpl2
691
" Vim compiler file " Compiler: Intel C++ 7.1 " Maintainer: David Harrison <david_jr@users.sourceforge.net> " Last Change: 2012 Apr 30 if exists("current_compiler") finish endif let current_compiler = "intel" let s:keepcpo= &cpo set cpo&vim if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif CompilerSet errorformat=%E%f(%l):\ error:\ %m, \%W%f(%l):\ warning:\ %m, \%I%f(%l):\ remark\ #%n:\ %m, \%+C\ \ %m., \%-Z\ \ %p^, \%-G\\s%#, \%-G%.%# let &cpo = s:keepcpo unlet s:keepcpo
zyz2011-vim
runtime/compiler/intel.vim
Vim Script
gpl2
595
" Compiler: GNU Fortran Compiler " Maintainer: H Xu <xuhdev@gmail.com> " Version: 0.1.3 " Last Change: 2012 Apr 30 " Homepage: http://www.vim.org/scripts/script.php?script_id=3496 " https://bitbucket.org/xuhdev/compiler-gfortran.vim " License: Same as Vim if exists('current_compiler') finish endif let current_compiler = 'gfortran' let s:keepcpo= &cpo set cpo&vim if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif CompilerSet errorformat= \%A%f:%l.%c:, \%-Z%trror:\ %m, \%-Z%tarning:\ %m, \%-C%.%# let &cpo = s:keepcpo unlet s:keepcpo
zyz2011-vim
runtime/compiler/gfortran.vim
Vim Script
gpl2
671
" Vim compiler file " Compiler: SGI IRIX 5.3 CC or NCC " Maintainer: David Harrison <david_jr@users.sourceforge.net> " Last Change: 2012 Apr 30 if exists("current_compiler") finish endif let current_compiler = "irix5_cpp" let s:keepcpo= &cpo set cpo&vim if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif CompilerSet errorformat=%E\"%f\"\\,\ line\ %l:\ error(%n):\ , \%E\"%f\"\\,\ line\ %l:\ error(%n):\ %m, \%W\"%f\"\\,\ line\ %l:\ warning(%n):\ %m, \%+IC++\ prelinker:\ %m, \%-Z\ \ %p%^, \%+C\ %\\{10}%.%#, \%-G%.%# let &cpo = s:keepcpo unlet s:keepcpo
zyz2011-vim
runtime/compiler/irix5_cpp.vim
Vim Script
gpl2
671
" Vim compiler file " Compiler: Microsoft Visual Studio C# " Maintainer: Zhou YiChao (broken.zhou@gmail.com) " Previous Maintainer: Joseph H. Yao (hyao@sina.com) " Last Change: 2012 Apr 30 if exists("current_compiler") finish endif let current_compiler = "cs" let s:keepcpo= &cpo set cpo&vim if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif CompilerSet errorformat& CompilerSet errorformat+=%f(%l\\,%v):\ %t%*[^:]:\ %m, \%trror%*[^:]:\ %m, \%tarning%*[^:]:\ %m CompilerSet makeprg=csc\ % let &cpo = s:keepcpo unlet s:keepcpo
zyz2011-vim
runtime/compiler/cs.vim
Vim Script
gpl2
626