diff options
Diffstat (limited to 'vim/after/ftplugin')
-rw-r--r-- | vim/after/ftplugin/c.vim | 5 | ||||
-rw-r--r-- | vim/after/ftplugin/cpp.vim | 5 | ||||
-rw-r--r-- | vim/after/ftplugin/gitcommit.vim | 2 | ||||
-rw-r--r-- | vim/after/ftplugin/html.vim | 6 | ||||
-rw-r--r-- | vim/after/ftplugin/sh.vim | 10 | ||||
-rw-r--r-- | vim/after/ftplugin/vim.vim | 22 |
6 files changed, 31 insertions, 19 deletions
diff --git a/vim/after/ftplugin/c.vim b/vim/after/ftplugin/c.vim index 9ac59733..da34d269 100644 --- a/vim/after/ftplugin/c.vim +++ b/vim/after/ftplugin/c.vim @@ -5,13 +5,14 @@ endif " Include macros in completion setlocal complete+=d +let b:undo_ftplugin .= '|setlocal complete<' " Set include pattern setlocal include=^\\s*#\\s*include +let b:undo_ftplugin .= '|setlocal include<' " Include headers on UNIX if has('unix') setlocal path+=/usr/include + let b:undo_ftplugin .= '|setlocal path<' endif - -let b:undo_ftplugin .= '|setlocal complete< include< path<' diff --git a/vim/after/ftplugin/cpp.vim b/vim/after/ftplugin/cpp.vim index b5596613..4042fb84 100644 --- a/vim/after/ftplugin/cpp.vim +++ b/vim/after/ftplugin/cpp.vim @@ -5,13 +5,14 @@ endif " Include macros in completion setlocal complete+=d +let b:undo_ftplugin .= '|setlocal complete<' " Set include pattern setlocal include=^\\s*#\\s*include +let b:undo_ftplugin .= '|setlocal include<' " Include headers on UNIX if has('unix') setlocal path+=/usr/include + let b:undo_ftplugin .= '|setlocal path<' endif - -let b:undo_ftplugin .= '|setlocal complete< include< path<' diff --git a/vim/after/ftplugin/gitcommit.vim b/vim/after/ftplugin/gitcommit.vim index c9b14b6b..2dc5fa37 100644 --- a/vim/after/ftplugin/gitcommit.vim +++ b/vim/after/ftplugin/gitcommit.vim @@ -12,7 +12,7 @@ let b:undo_ftplugin .= '|setlocal comments< formatoptions<' if has('autocmd') && exists('+cursorcolumn') augroup gitcommit autocmd CursorMoved,CursorMovedI <buffer> - \ let &l:colorcolumn = gitcommit#CursorColumn() + \ let &l:colorcolumn = gitcommit#CursorColumn() augroup END let b:undo_ftplugin .= '|autocmd! gitcommit' \ . '|augroup! gitcommit' diff --git a/vim/after/ftplugin/html.vim b/vim/after/ftplugin/html.vim index dc429221..759d06bf 100644 --- a/vim/after/ftplugin/html.vim +++ b/vim/after/ftplugin/html.vim @@ -12,9 +12,9 @@ let b:undo_ftplugin .= '|unlet b:current_compiler' " Set up hooks for timestamp updating augroup html_timestamp autocmd BufWritePre <buffer> - \ if exists('b:html_timestamp_check') - \| call html#TimestampUpdate() - \|endif + \ if exists('b:html_timestamp_check') + \| call html#TimestampUpdate() + \|endif augroup END let b:undo_ftplugin .= '|autocmd! html_timestamp BufWritePre <buffer>' diff --git a/vim/after/ftplugin/sh.vim b/vim/after/ftplugin/sh.vim index 766994b7..fdc42ccc 100644 --- a/vim/after/ftplugin/sh.vim +++ b/vim/after/ftplugin/sh.vim @@ -33,6 +33,16 @@ if exists('b:is_posix') let g:is_posix = 1 endif +" Queue up undo commands to clear the shell language flags that we set for +" this buffer during filetype detection in filetype.vim +if exists('b:is_bash') + let b:undo_ftplugin .= '|unlet b:is_bash' +elseif exists('b:is_kornshell') + let b:undo_ftplugin .= '|unlet b:is_kornshell' +elseif exists('b:is_posix') + let b:undo_ftplugin .= '|unlet b:is_posix' +endif + " Stop here if the user doesn't want ftplugin mappings if exists('g:no_plugin_maps') || exists('g:no_sh_maps') finish diff --git a/vim/after/ftplugin/vim.vim b/vim/after/ftplugin/vim.vim index 46182627..2fc5bd78 100644 --- a/vim/after/ftplugin/vim.vim +++ b/vim/after/ftplugin/vim.vim @@ -24,15 +24,15 @@ let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>K' " 8.1.273 updated the runtime files to include a fix for this if v:version < 801 || v:version == 801 && !has('patch273') let b:undo_ftplugin .= '|nunmap <buffer> [[' - \ . '|vunmap <buffer> [[' - \ . '|nunmap <buffer> ]]' - \ . '|vunmap <buffer> ]]' - \ . '|nunmap <buffer> []' - \ . '|vunmap <buffer> []' - \ . '|nunmap <buffer> ][' - \ . '|vunmap <buffer> ][' - \ . '|nunmap <buffer> ]"' - \ . '|vunmap <buffer> ]"' - \ . '|nunmap <buffer> ["' - \ . '|vunmap <buffer> ["' + \ . '|vunmap <buffer> [[' + \ . '|nunmap <buffer> ]]' + \ . '|vunmap <buffer> ]]' + \ . '|nunmap <buffer> []' + \ . '|vunmap <buffer> []' + \ . '|nunmap <buffer> ][' + \ . '|vunmap <buffer> ][' + \ . '|nunmap <buffer> ]"' + \ . '|vunmap <buffer> ]"' + \ . '|nunmap <buffer> ["' + \ . '|vunmap <buffer> ["' endif |