aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-11-29 00:09:16 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-11-29 00:09:16 +1300
commitffc11a076b7bb0ce7ac936085a904eb35603fdac (patch)
treee7c40d63bc955bfb3fc4979b73d630edfd398df1 /vim/after/ftplugin
parentMerge branch 'hotfix/v1.77.1' (diff)
parentBump VERSION (diff)
downloaddotfiles-ffc11a076b7bb0ce7ac936085a904eb35603fdac.tar.gz
dotfiles-ffc11a076b7bb0ce7ac936085a904eb35603fdac.zip
Merge branch 'release/v1.78.0'v1.78.0
* release/v1.78.0: Bump VERSION Correct indentation in a few vim/after scripts Move b:undo_ftplugin unsets for C inline with sets Add config file for mpv Use full "mouse" for xset(1) call in ~/.xinitrc Remove vim-tiny workaround for 'undodir' setting Define b:undo_indent for Perl buffers Set missing b:undo_indent instructions for AWK Undo shell script dialect flags from filetype.vim Code-format word in TABS.md Remove a lot of alignment spacing
Diffstat (limited to 'vim/after/ftplugin')
-rw-r--r--vim/after/ftplugin/c.vim5
-rw-r--r--vim/after/ftplugin/cpp.vim5
-rw-r--r--vim/after/ftplugin/gitcommit.vim2
-rw-r--r--vim/after/ftplugin/html.vim6
-rw-r--r--vim/after/ftplugin/sh.vim10
-rw-r--r--vim/after/ftplugin/vim.vim22
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