diff options
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r-- | runtime/ftplugin/chicken.vim | 51 | ||||
-rw-r--r-- | runtime/ftplugin/cmake.vim | 16 | ||||
-rw-r--r-- | runtime/ftplugin/debchangelog.vim | 6 | ||||
-rw-r--r-- | runtime/ftplugin/debcontrol.vim | 6 | ||||
-rw-r--r-- | runtime/ftplugin/nsis.vim | 33 | ||||
-rw-r--r-- | runtime/ftplugin/python.vim | 5 | ||||
-rw-r--r-- | runtime/ftplugin/scheme.vim | 85 | ||||
-rw-r--r-- | runtime/ftplugin/vim.vim | 34 | ||||
-rw-r--r-- | runtime/ftplugin/zimbu.vim | 8 |
9 files changed, 178 insertions, 66 deletions
diff --git a/runtime/ftplugin/chicken.vim b/runtime/ftplugin/chicken.vim new file mode 100644 index 0000000000..8daa04c774 --- /dev/null +++ b/runtime/ftplugin/chicken.vim @@ -0,0 +1,51 @@ +" CHICKEN-specific Vim customizations +" Last Change: 2018-01-06 +" Author: Evan Hanson <evhan@foldling.org> +" Maintainer: Evan Hanson <evhan@foldling.org> +" URL: https://foldling.org/vim/ftplugin/chicken.vim +" Notes: These are supplemental settings, to be loaded after the core +" Scheme ftplugin file (ftplugin/scheme.vim). Enable it by setting +" b:is_chicken=1 and filetype=scheme. + +if !exists('b:did_scheme_ftplugin') + finish +endif + +setl keywordprg=chicken-doc + +setl lispwords+=and-let* +setl lispwords+=begin-for-syntax +setl lispwords+=compiler-typecase +setl lispwords+=condition-case +setl lispwords+=define-compiler-syntax +setl lispwords+=define-constant +setl lispwords+=define-external +setl lispwords+=define-for-syntax +setl lispwords+=define-inline +setl lispwords+=define-record +setl lispwords+=define-record-printer +setl lispwords+=define-specialization +setl lispwords+=define-syntax-rule +setl lispwords+=eval-when +setl lispwords+=fluid-let +setl lispwords+=handle-exceptions +setl lispwords+=let-compiler-syntax +setl lispwords+=let-optionals +setl lispwords+=let-optionals* +setl lispwords+=letrec-values +setl lispwords+=match +setl lispwords+=match-lambda +setl lispwords+=match-lambda* +setl lispwords+=match-let +setl lispwords+=match-let* +setl lispwords+=module +setl lispwords+=receive +setl lispwords+=select +setl lispwords+=set!-values + +let b:undo_ftplugin = b:undo_ftplugin . ' keywordprg<' + +if exists('g:loaded_matchit') && !exists('b:match_words') + let b:match_words = '#>:<#' + let b:undo_ftplugin = b:undo_ftplugin . ' | unlet! b:match_words' +endif diff --git a/runtime/ftplugin/cmake.vim b/runtime/ftplugin/cmake.vim new file mode 100644 index 0000000000..e81cd4071c --- /dev/null +++ b/runtime/ftplugin/cmake.vim @@ -0,0 +1,16 @@ +" Vim filetype plugin +" Language: CMake +" Maintainer: Keith Smiley <keithbsmiley@gmail.com> +" Last Change: 2017 Dec 24 + +" 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 b:undo_ftplugin = "setl commentstring<" + +setlocal commentstring=#\ %s diff --git a/runtime/ftplugin/debchangelog.vim b/runtime/ftplugin/debchangelog.vim index d2718db88e..32f683109d 100644 --- a/runtime/ftplugin/debchangelog.vim +++ b/runtime/ftplugin/debchangelog.vim @@ -1,11 +1,11 @@ " Vim filetype plugin file (GUI menu, folding and completion) " Language: Debian Changelog -" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> +" Maintainer: Debian Vim Maintainers " Former Maintainers: Michael Piefel <piefel@informatik.hu-berlin.de> " Stefano Zacchiroli <zack@debian.org> -" Last Change: 2014-01-31 +" Last Change: 2018-01-06 " License: Vim License -" URL: http://hg.debian.org/hg/pkg-vim/vim/file/unstable/runtime/ftplugin/debchangelog.vim +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/ftplugin/debchangelog.vim " Bug completion requires apt-listbugs installed for Debian packages or " python-launchpadlib installed for Ubuntu packages diff --git a/runtime/ftplugin/debcontrol.vim b/runtime/ftplugin/debcontrol.vim index 7871d9897f..9643d16c28 100644 --- a/runtime/ftplugin/debcontrol.vim +++ b/runtime/ftplugin/debcontrol.vim @@ -1,9 +1,9 @@ " Vim filetype plugin file (GUI menu and folding) " Language: Debian control files -" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> +" Maintainer: Debian Vim Maintainers " Former Maintainer: Pierre Habouzit <madcoder@debian.org> -" Last Change: 2008-03-08 -" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/tip/runtime/ftplugin/debcontrol.vim +" Last Change: 2018-01-06 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/ftplugin/debcontrol.vim " Do these settings once per buffer if exists("b:did_ftplugin") diff --git a/runtime/ftplugin/nsis.vim b/runtime/ftplugin/nsis.vim index 949691bf6e..1a35127c86 100644 --- a/runtime/ftplugin/nsis.vim +++ b/runtime/ftplugin/nsis.vim @@ -1,22 +1,43 @@ " Vim ftplugin file -" Language: NSIS script -" Previous Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2008-07-09 - -let s:cpo_save = &cpo -set cpo&vim +" Language: NSIS script +" Maintainer: Ken Takata +" URL: https://github.com/k-takata/vim-nsis +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Last Change: 2018-01-26 if exists("b:did_ftplugin") finish endif + +let s:cpo_save = &cpo +set cpo&vim + let b:did_ftplugin = 1 let b:undo_ftplugin = "setl com< cms< fo< def< inc<" + \ " | unlet! b:match_ignorecase b:match_words" 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\\)\\= +if exists("loaded_matchit") + let b:match_ignorecase = 1 + let b:match_words = + \ '\${\%(If\|IfNot\|Unless\)}:\${\%(Else\|ElseIf\|ElseIfNot\|ElseUnless\)}:\${\%(EndIf\|EndUnless\)},' . + \ '\${Select}:\${EndSelect},' . + \ '\${Switch}:\${EndSwitch},' . + \ '\${\%(Do\|DoWhile\|DoUntil\)}:\${\%(Loop\|LoopWhile\|LoopUntil\)},' . + \ '\${\%(For\|ForEach\)}:\${Next},' . + \ '\<Function\>:\<FunctionEnd\>,' . + \ '\<Section\>:\<SectionEnd\>,' . + \ '\<SectionGroup\>:\<SectionGroupEnd\>,' . + \ '\<PageEx\>:\<PageExEnd\>,' . + \ '\${MementoSection}:\${MementoSectionEnd},' . + \ '!if\%(\%(macro\)\?n\?def\)\?\>:!else\>:!endif\>,' . + \ '!macro\>:!macroend\>' +endif + let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/ftplugin/python.vim b/runtime/ftplugin/python.vim index 54926418de..56f19cb323 100644 --- a/runtime/ftplugin/python.vim +++ b/runtime/ftplugin/python.vim @@ -3,7 +3,7 @@ " Maintainer: Tom Picton <tom@tompicton.co.uk> " Previous Maintainer: James Sully <sullyj3@gmail.com> " Previous Maintainer: Johannes Zellner <johannes@zellner.org> -" Last Change: Thur, 09 November 2017 +" Last Change: Wed, 20 December 2017 " https://github.com/tpict/vim-ftplugin-python if exists("b:did_ftplugin") | finish | endif @@ -20,6 +20,9 @@ setlocal comments=b:#,fb:- setlocal commentstring=#\ %s setlocal omnifunc=pythoncomplete#Complete +if has('python3') + setlocal omnifunc=python3complete#Complete +endif set wildignore+=*.pyc diff --git a/runtime/ftplugin/scheme.vim b/runtime/ftplugin/scheme.vim index ab1543a5ee..b7f8e8bbe7 100644 --- a/runtime/ftplugin/scheme.vim +++ b/runtime/ftplugin/scheme.vim @@ -1,45 +1,62 @@ -" Vim filetype plugin -" Language: Scheme -" Maintainer: Sergey Khorev <sergey.khorev@gmail.com> -" URL: http://sites.google.com/site/khorser/opensource/vim -" Original author: Dorai Sitaram <ds26@gte.com> -" Original URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html -" Last Change: Oct 23, 2013 - -" Only do this when not done yet for this buffer -if exists("b:did_ftplugin") +" Vim filetype plugin file +" Language: Scheme (R7RS) +" Last Change: 2018-01-20 +" Author: Evan Hanson <evhan@foldling.org> +" Maintainer: Evan Hanson <evhan@foldling.org> +" Previous Maintainer: Sergey Khorev <sergey.khorev@gmail.com> +" URL: https://foldling.org/vim/ftplugin/scheme.vim + +if exists('b:did_ftplugin') finish endif -" Don't load another plugin for this buffer -let b:did_ftplugin = 1 +let s:cpo = &cpo +set cpo&vim -" Copy-paste from ftplugin/lisp.vim -setl comments=:; -setl define=^\\s*(def\\k* -setl formatoptions-=t -setl iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94 setl lisp +setl comments=:;;;;,:;;;,:;;,:;,sr:#\|,ex:\|# setl commentstring=;%s +setl define=^\\s*(def\\k* +setl iskeyword=33,35-39,42-43,45-58,60-90,94,95,97-122,126 -setl comments^=:;;;,:;;,sr:#\|,mb:\|,ex:\|# +let b:undo_ftplugin = 'setl lisp< comments< commentstring< define< iskeyword<' -" Scheme-specific settings -if exists("b:is_mzscheme") || exists("is_mzscheme") - " improve indenting - setl iskeyword+=#,%,^ - setl lispwords+=module,parameterize,let-values,let*-values,letrec-values - setl lispwords+=define-values,opt-lambda,case-lambda,syntax-rules,with-syntax,syntax-case - setl lispwords+=define-signature,unit,unit/sig,compund-unit/sig,define-values/invoke-unit/sig -endif +setl lispwords=begin +setl lispwords+=case +setl lispwords+=case-lambda +setl lispwords+=cond +setl lispwords+=cond-expand +setl lispwords+=define +setl lispwords+=define-record-type +setl lispwords+=define-syntax +setl lispwords+=define-values +setl lispwords+=do +setl lispwords+=guard +setl lispwords+=import +setl lispwords+=lambda +setl lispwords+=let +setl lispwords+=let* +setl lispwords+=let*-values +setl lispwords+=let-syntax +setl lispwords+=let-values +setl lispwords+=letrec +setl lispwords+=letrec* +setl lispwords+=letrec-syntax +setl lispwords+=parameterize +setl lispwords+=set! +setl lispwords+=syntax-rules +setl lispwords+=unless +setl lispwords+=when + +let b:undo_ftplugin = b:undo_ftplugin . ' lispwords<' -if exists("b:is_chicken") || exists("is_chicken") - " improve indenting - setl iskeyword+=#,%,^ - setl lispwords+=let-optionals,let-optionals*,declare - setl lispwords+=let-values,let*-values,letrec-values - setl lispwords+=define-values,opt-lambda,case-lambda,syntax-rules,with-syntax,syntax-case - setl lispwords+=cond-expand,and-let*,foreign-lambda,foreign-lambda* +let b:did_scheme_ftplugin = 1 + +if exists('b:is_chicken') || exists('g:is_chicken') + exe 'ru! ftplugin/chicken.vim' endif -let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lispwords< lisp< commentstring<" +unlet b:did_scheme_ftplugin +let b:did_ftplugin = 1 +let &cpo = s:cpo +unlet s:cpo diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index f34655f330..59ea349710 100644 --- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Vim " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2017 Nov 06 +" Last Change: 2017 Dec 05 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -42,21 +42,23 @@ setlocal commentstring=\"%s " Prefer Vim help instead of manpages. setlocal keywordprg=:help -" Move around functions. -nnoremap <silent><buffer> [[ m':call search('^\s*fu\%[nction]\>', "bW")<CR> -vnoremap <silent><buffer> [[ m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "bW")<CR> -nnoremap <silent><buffer> ]] m':call search('^\s*fu\%[nction]\>', "W")<CR> -vnoremap <silent><buffer> ]] m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "W")<CR> -nnoremap <silent><buffer> [] m':call search('^\s*endf*\%[unction]\>', "bW")<CR> -vnoremap <silent><buffer> [] m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "bW")<CR> -nnoremap <silent><buffer> ][ m':call search('^\s*endf*\%[unction]\>', "W")<CR> -vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "W")<CR> - -" Move around comments -nnoremap <silent><buffer> ]" :call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> -vnoremap <silent><buffer> ]" :<C-U>exe "normal! gv"<Bar>call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> -nnoremap <silent><buffer> [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> -vnoremap <silent><buffer> [" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> +if !exists("no_plugin_maps") && !exists("no_vim_maps") + " Move around functions. + nnoremap <silent><buffer> [[ m':call search('^\s*fu\%[nction]\>', "bW")<CR> + vnoremap <silent><buffer> [[ m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "bW")<CR> + nnoremap <silent><buffer> ]] m':call search('^\s*fu\%[nction]\>', "W")<CR> + vnoremap <silent><buffer> ]] m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "W")<CR> + nnoremap <silent><buffer> [] m':call search('^\s*endf*\%[unction]\>', "bW")<CR> + vnoremap <silent><buffer> [] m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "bW")<CR> + nnoremap <silent><buffer> ][ m':call search('^\s*endf*\%[unction]\>', "W")<CR> + vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "W")<CR> + + " Move around comments + nnoremap <silent><buffer> ]" :call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> + vnoremap <silent><buffer> ]" :<C-U>exe "normal! gv"<Bar>call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> + nnoremap <silent><buffer> [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> + vnoremap <silent><buffer> [" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> +endif " Let the matchit plugin know what items can be matched. if exists("loaded_matchit") diff --git a/runtime/ftplugin/zimbu.vim b/runtime/ftplugin/zimbu.vim index 558aea7df0..24674776cb 100644 --- a/runtime/ftplugin/zimbu.vim +++ b/runtime/ftplugin/zimbu.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Zimbu " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2012 Sep 08 +" Last Change: 2017 Dec 05 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -135,8 +135,10 @@ 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> +if !exists("no_plugin_maps") && !exists("no_zimbu_maps") + nnoremap <silent> <buffer> [[ m`:call ZimbuGoStartBlock()<CR> + nnoremap <silent> <buffer> ]] m`:call ZimbuGoEndBlock()<CR> +endif " Using a function makes sure the search pattern is restored func! ZimbuGoStartBlock() |