diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-08-16 23:28:48 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-08-16 23:28:48 +1200 |
commit | 39bac9a74ebaaf6e1ee6fc2c51cda9c640498d93 (patch) | |
tree | 0aad276e7df88d04dbdaa925180128d7a0a8ee99 /vim/vimrc | |
parent | Merge branch 'release/v1.54.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-1.55.0.tar.gz (sig) dotfiles-1.55.0.zip |
Merge branch 'release/v1.55.0'v1.55.0
* release/v1.55.0:
Bump VERSION
Add explanatory README to vim/plugin directory
Update new Vim plugins
Spin equalalways_resized.vim into its own dist
Spin foldlevelstart_stdin.vim into its own dist
Work around buggy old Vim 'help' ftplugin undo
Don't set vint compiler for commandline windows
Revert "Set gitconfig commit.verbose, clear com...
Qualify unmap with version number guard
Add a comment
Spin out scroll_next.vim into its own dist
Use <PageDown> rather than <C-F> in mapping
Reorder .vimrc a bit
Remove Unix 'backupskip' parts if not running Unix
Diffstat (limited to 'vim/vimrc')
-rw-r--r-- | vim/vimrc | 60 |
1 files changed, 32 insertions, 28 deletions
@@ -55,6 +55,10 @@ endif " Add some paths not to back up set backupskip^=/dev/shm/* " Shared memory RAM disk set backupskip^=/var/tmp/* " Debian's $TMPDIR for sudoedit(8) +if !has('unix') + set backupskip-=/dev/shm/* + set backupskip-=/var/tmp/* +endif " Indent wrapped lines silent! set breakindent @@ -62,6 +66,12 @@ silent! set breakindent " Clear default 'comments' value, let the filetype handle it set comments= +" Add completion options +if exists('+completeopt') + set completeopt+=longest " Insert longest common substring + set completeopt+=menuone " Show the menu even if only one match +endif + " Give me a prompt instead of just rejecting risky :write, :saveas set confirm @@ -87,6 +97,12 @@ endif " Don't wait for a key after Escape in insert mode silent! set noesckeys +" Fold based on indent, but only when I ask +if has('folding') + set foldlevelstart=99 + set foldmethod=indent +endif + " Delete comment leaders when joining lines, if supported silent! set formatoptions+=j @@ -95,6 +111,11 @@ if system('grep --version') =~# '^grep (GNU grep)' set grepprg=grep\ -HnRs\ --exclude='.git*' endif +" Don't load GUI menus; set here before GUI starts +if has('gui_running') + set guioptions+=M +endif + " Allow buffers to have changes without being displayed set hidden @@ -139,6 +160,12 @@ set nrformats-=octal set path-=/usr/include " Let the C/C++ filetypes set that set path+=** " Search current directory's whole tree +" Make sessions usable +if exists('+sessionoptions') + set sessionoptions-=localoptions " No buffer options or mappings + set sessionoptions-=options " No global options or mappings +endif + " Don't show startup splash screen (I donated) set shortmess+=I @@ -155,28 +182,6 @@ set timeoutlen=3000 " No terminal mouse, even if we could silent! set ttymouse= -" Wildmenu settings; see also plugin/wildignore.vim -set wildmenu " Use wildmenu -set wildmode=list:longest " Tab press completes and lists -silent! set wildignorecase " Case insensitive, if supported - -" Add completion options -if exists('+completeopt') - set completeopt+=longest " Insert longest common substring - set completeopt+=menuone " Show the menu even if only one match -endif - -" Fold based on indent, but only when I ask -if has('folding') - set foldlevelstart=99 - set foldmethod=indent -endif - -" Don't load GUI menus; set here before GUI starts -if has('gui_running') - set guioptions+=M -endif - " Keep undo files, hopefully in a dedicated directory if has('persistent_undo') set undofile @@ -187,11 +192,10 @@ if has('persistent_undo') endif endif -" Make sessions usable -if exists('+sessionoptions') - set sessionoptions-=localoptions " No buffer options or mappings - set sessionoptions-=options " No global options or mappings -endif +" Wildmenu settings; see also plugin/wildignore.vim +set wildmenu " Use wildmenu +set wildmode=list:longest " Tab press completes and lists +silent! set wildignorecase " Case insensitive, if supported " Let me move beyond buffer text in visual block mode if exists('+virtualedit') @@ -211,7 +215,7 @@ endif imap <C-K><C-K> <Plug>(DigraphSearch) " Remap normal space to scroll down a page -nnoremap <Space> <C-F> +nnoremap <Space> <PageDown> " If we have plugins, do a :next after hitting the last line if &loadplugins nmap <Space> <Plug>(ScrollNext) |