diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-11 15:24:01 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-11 15:24:01 +1200 |
commit | d2e2635fa5020ed12d570cdb691c0375238cb9f9 (patch) | |
tree | 8355c379bace019995e4b0d79ea06f9cb651cef7 /vim/autoload | |
parent | Merge branch 'release/v5.40.0' into develop (diff) | |
download | dotfiles-d2e2635fa5020ed12d570cdb691c0375238cb9f9.tar.gz dotfiles-d2e2635fa5020ed12d570cdb691c0375238cb9f9.zip |
Clean up ad-hoc plugins
These might end up packaged shortly.
Diffstat (limited to 'vim/autoload')
-rw-r--r-- | vim/autoload/spellfile_local.vim | 11 | ||||
-rw-r--r-- | vim/autoload/utc.vim | 4 |
2 files changed, 15 insertions, 0 deletions
diff --git a/vim/autoload/spellfile_local.vim b/vim/autoload/spellfile_local.vim new file mode 100644 index 00000000..aafe64ef --- /dev/null +++ b/vim/autoload/spellfile_local.vim @@ -0,0 +1,11 @@ +function! spellfile_local#() abort + let spellfile = join([ + \ substitute(expand('%:p'), '[^0-9A-Za-z_.-]', '%', 'g'), + \ substitute(v:lang, '_.*', '', ''), + \ &encoding + \ ], '.') . '.add' + Establish $MYVIM/cache/spell/local + execute 'setlocal spellfile+=$MYVIM/cache/spell/local/'.spellfile + nnoremap <buffer> zG 2zg + xnoremap <buffer> zG 2zg +endfunction diff --git a/vim/autoload/utc.vim b/vim/autoload/utc.vim new file mode 100644 index 00000000..1a464342 --- /dev/null +++ b/vim/autoload/utc.vim @@ -0,0 +1,4 @@ +function! utc#(command) abort + let tz = expand('$TZ') + let $TZ = 'UTC' | execute a:command | let $TZ = tz +endfunction |