aboutsummaryrefslogtreecommitdiff
path: root/vim
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
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')
-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
-rw-r--r--vim/after/indent/awk.vim7
-rw-r--r--vim/after/indent/perl.vim9
-rw-r--r--vim/vimrc4
9 files changed, 49 insertions, 21 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
diff --git a/vim/after/indent/awk.vim b/vim/after/indent/awk.vim
new file mode 100644
index 00000000..fc848d2a
--- /dev/null
+++ b/vim/after/indent/awk.vim
@@ -0,0 +1,7 @@
+" The stock AWK indenting is decent, but doesn't include an undo variable;
+" this adds one, clearing away the sole global function too.
+if !exists('b:undo_indent')
+ let b:undo_indent = 'unlet! b:did_indent'
+ let b:undo_indent = b:undo_indent . '|setlocal indentexpr< indentkeys<'
+ let b:undo_indent = b:undo_indent . '|delfunction! GetAwkIndent'
+endif
diff --git a/vim/after/indent/perl.vim b/vim/after/indent/perl.vim
new file mode 100644
index 00000000..6f97d979
--- /dev/null
+++ b/vim/after/indent/perl.vim
@@ -0,0 +1,9 @@
+" The stock Perl indenting is decent, but doesn't include an undo variable;
+" this adds one
+if !exists('b:undo_indent')
+ let b:undo_indent = 'unlet! b:did_indent'
+ let b:undo_indent = b:undo_indent . '|setlocal indentexpr< indentkeys<'
+ let b:undo_indent = b:undo_indent . '|unlet! b:indent_use_syntax'
+ let b:undo_indent = b:undo_indent . '|unlet! b:match_skip'
+ let b:undo_indent = b:undo_indent . '|unlet! b:match_words'
+endif
diff --git a/vim/vimrc b/vim/vimrc
index 03844def..25fe4e05 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -198,10 +198,10 @@ silent! set ttymouse=
" Keep undo files, hopefully in a dedicated directory
if has('persistent_undo')
set undofile
- set undodir^=~/.vim/cache/undo//
if has('win32') || has('win64')
- set undodir-=~/.vim/cache/undo//
set undodir^=~/vimfiles/cache/undo//
+ else
+ set undodir^=~/.vim/cache/undo//
endif
endif