diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-26 18:32:34 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-26 18:32:34 +1300 |
commit | e23443b927b159a3fcd134f96c208c74e4ad6fe2 (patch) | |
tree | 49ee3226cad80af63c40c07dbf1d090a9e582b15 /vim | |
parent | Merge branch 'hotfix/v3.6.1' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-4.0.0.tar.gz (sig) dotfiles-4.0.0.zip |
Merge branch 'release/v4.0.0'v4.0.0
* release/v4.0.0:
Switch to two-space sentences
Remove repeat.vim and surround.vim
Force 'ttymouse' off a little more carefully
No longer need a longer 'timeoutlen' in Vim
Include /usr/tmp in 'backupskip'
Factor out vimrc user 'runtimepath' switching
Diffstat (limited to 'vim')
-rw-r--r-- | vim/after/plugin/surround.vim | 9 | ||||
m--------- | vim/bundle/repeat | 0 | ||||
m--------- | vim/bundle/surround | 0 | ||||
-rw-r--r-- | vim/vimrc | 43 |
4 files changed, 20 insertions, 32 deletions
diff --git a/vim/after/plugin/surround.vim b/vim/after/plugin/surround.vim deleted file mode 100644 index 800bc38d..00000000 --- a/vim/after/plugin/surround.vim +++ /dev/null @@ -1,9 +0,0 @@ -" Remove surround.vim's insert mode maps -if !exists('g:loaded_surround') - finish -endif -iunmap <Plug>ISurround -iunmap <Plug>Isurround -iunmap <C-G>S -iunmap <C-G>s -iunmap <C-S> diff --git a/vim/bundle/repeat b/vim/bundle/repeat deleted file mode 160000 -Subproject 43d2678fa59d068c815d8298331c195e850ff5a diff --git a/vim/bundle/surround b/vim/bundle/surround deleted file mode 160000 -Subproject 597068870b8f093a8b2d11536c62ff31222ee8d @@ -4,6 +4,15 @@ " Undo anything the operating system's vimrc may have broken runtime system.vim +" Set an environment variable for the user runtime directory +if !exists('$MYVIMRUNTIME') + if has('win32') || has('win64') + let $MYVIMRUNTIME = expand('~/vimfiles') + else + let $MYVIMRUNTIME = expand('~/.vim') + endif +endif + " Load filetype settings, plugins, and maps if has('autocmd') let g:maplocalleader = ',' @@ -49,16 +58,13 @@ set backspace+=start " The start of current insertion " Try to keep backups in one system-appropriate dir set backup -if has('win32') || has('win64') - set backupdir^=~/vimfiles/cache/backup -else - set backupdir^=~/.vim/cache/backup -endif +set backupdir^=$MYVIMRUNTIME/cache/backup " Add some paths not to back up if has('unix') set backupskip^=/dev/shm/* " Shared memory RAM disk - set backupskip^=/var/tmp/* " Debian's $TMPDIR for sudoedit(8) + set backupskip^=/usr/tmp/* " Hardcoded path for `sudo -e` + set backupskip^=/var/tmp/* " Hardcoded path for `sudo -e` endif " Indent wrapped lines if supported @@ -78,12 +84,12 @@ endif " Give me a prompt instead of just rejecting risky :write, :saveas set confirm +" Require two spaces for sentence objects +" Yes, I have become a filthy two-spacer +set cpoptions+=J + " Try to keep swapfiles in one system-appropriate dir -if has('win32') || has('win64') - set directory^=~/vimfiles/cache/swap// -else - set directory^=~/.vim/cache/swap// -endif +set directory^=$MYVIMRUNTIME/cache/swap// " Use UTF-8 if we can and env LANG didn't tell us not to if has('multi_byte') && !exists('$LANG') && &encoding ==# 'latin1' @@ -133,9 +139,6 @@ set include= " Show search matches as I type my pattern set incsearch -" Don't join lines with two spaces at the end of sentences -set nojoinspaces - " Don't show a statusline if there's only one window " This is the Vim default, but NeoVim changed it if &laststatus != 1 @@ -187,22 +190,16 @@ set showbreak=... set splitbelow " Below the current window, not above set splitright " Right of the current window, not left -" Give me a bit longer to complete mappings -set timeoutlen=3000 - " No terminal mouse, even if we could -if exists('+ttymouse') +" The manual says to set 't_RV', but I don't like that +if exists('+ttymouse') && &ttymouse !=# '' set ttymouse= endif " Keep undo files, hopefully in a dedicated directory if has('persistent_undo') set undofile - if has('win32') || has('win64') - set undodir^=~/vimfiles/cache/undo// - else - set undodir^=~/.vim/cache/undo// - endif + set undodir^=$MYVIMRUNTIME/cache/undo// endif " Wildmenu settings; see also plugin/wildignore.vim |