diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-19 14:39:54 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-19 14:39:54 +1200 |
commit | 27644cdf6686f1e05a588382d41cfd9e375e8f74 (patch) | |
tree | 7814b6d808f03fb8311efbc4ee3ff6b91e5847ca /vim/vimrc | |
parent | Merge branch 'release/v4.32.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-27644cdf6686f1e05a588382d41cfd9e375e8f74.tar.gz dotfiles-27644cdf6686f1e05a588382d41cfd9e375e8f74.zip |
Merge branch 'release/v4.33.0'v4.33.0
* release/v4.33.0:
Bump VERSION
Simplify 'path' definition
Correct options order
Reassure Vim that PuTTY is 'ttyfast'
Add 'synmaxcol' setting
Spell check tweaking
Try doing without 'backspace' settings
Update vim-regex-escape to v0.2.0
Update vim-insert-timeout to v0.3.0
Remove en passant assignment from Makefile
Quote things in IDEAS.md to appease spellchecker
Quote things in ISSUES.md to appease spellchecker
Diffstat (limited to 'vim/vimrc')
-rw-r--r-- | vim/vimrc | 66 |
1 files changed, 34 insertions, 32 deletions
@@ -28,13 +28,8 @@ else let &softtabstop = &shiftwidth endif -" Let me backspace over pretty much anything -set backspace+=eol " Line breaks -set backspace+=indent " Spaces from 'autoindent' -set backspace+=start " The start of current insertion - -" Try to keep backups in one system-appropriate dir, including full encoded -" path in filename (trailing double slash) if supported (v8.1.251) +" Try to keep backups in one system-appropriate directory, including full +" encoded path in filename (trailing double slash) if supported (v8.1.251) set backup if v:version > 801 \ || v:version == 801 && has('patch251') @@ -46,8 +41,8 @@ endif " Add some *nix paths not to back up if has('unix') set backupskip^=/dev/shm/* " Shared memory RAM disk - set backupskip^=/usr/tmp/* " Hardcoded path for `sudo -e` - set backupskip^=/var/tmp/* " Hardcoded path for `sudo -e` + set backupskip^=/usr/tmp/* " Hard-coded path for `sudo -e` + set backupskip^=/var/tmp/* " Hard-coded path for `sudo -e` endif " Indent wrapped lines if supported (v7.4.338) @@ -69,11 +64,11 @@ set confirm " Sentence objects are separated by two spaces set cpoptions+=J -" Try to keep swapfiles in one system-appropriate dir, including full encoded -" path in filename (trailing double slash) +" Try to keep swap files in one system-appropriate directory, including full +" encoded path in filename (trailing double slash) set directory^=$MYVIMRUNTIME/cache/swap// -" Use UTF-8 if we can and env LANG didn't tell us not to +" Use UTF-8 if we can and $LANG doesn't tell us not to if has('multi_byte') \ && !exists('$LANG') \ && &encoding ==# 'latin1' @@ -124,7 +119,7 @@ set include= " Show search matches as I type my pattern set incsearch -" Don't show a statusline if there's only one window +" Don't show a status line if there's only one window " This is Vim's default, but not NeoVim's if &laststatus != 1 set laststatus=1 @@ -149,9 +144,8 @@ set nomodeline " Treat numbers with a leading zero as decimal, not octal set nrformats-=octal -" Options for file search with gf/:find -set path-=/usr/include " Let the C/C++ filetypes set that -set path+=** " Search current directory's whole tree +" Search whole directory tree, and not /usr/include +set path=** " Disable command line display of file position " This is Vim's default, but not NeoVim's @@ -173,6 +167,14 @@ set showbreak=... set splitbelow " Below the current window, not above set splitright " Right of the current window, not left +" Don't try to syntax highlight run-on lines +set synmaxcol=500 + +" PuTTY is a fast terminal +if &term =~# '^putty' + set ttyfast +endif + " No terminal mouse, even if we could; the manual says to set 't_RV', but I " don't like that " Not in NeoVim @@ -180,13 +182,19 @@ if exists('+ttymouse') && &ttymouse !=# '' set ttymouse= endif -" Try to keep persistent undo files in one system-appropriate dir (v7.2.438), -" including full encoded path in filename (trailing double slash) +" Try to keep persistent undo files in one system-appropriate directory +" (v7.2.438), including full encoded path in filename (trailing double slash) if has('persistent_undo') set undofile set undodir^=$MYVIMRUNTIME/cache/undo// endif +" Let me move beyond buffer text in visual block mode +set virtualedit+=block + +" Never beep at me +set visualbell t_vb= + " Tab completion settings set wildignore=*~ \,*.7z @@ -215,12 +223,6 @@ if exists('+wildignorecase') endif set wildmode=list:longest " Tab press completes and lists -" Let me move beyond buffer text in visual block mode -set virtualedit+=block - -" Never beep at me -set visualbell t_vb= - " Load filetype settings, plugins, and maps let maplocalleader = ',' filetype plugin indent on @@ -230,8 +232,8 @@ if !exists('syntax_on') syntax enable endif -" Try to use sahara colorscheme with 'cursorline' set; otherwise, use the -" default colorscheme with a dark background +" Try to use sahara color scheme with 'cursorline' set; otherwise, use the +" default color scheme with a dark background try colorscheme sahara set cursorline @@ -275,7 +277,7 @@ nnoremap ]a :next<CR> " Cycle through buffers nnoremap [b :bprevious<CR> nnoremap ]b :bnext<CR> -" Cycle through quicklist/:helpgrep items +" Cycle through quickfix list items nnoremap [c :cprevious<CR> nnoremap ]c :cnext<CR> " Cycle through location list items @@ -289,7 +291,7 @@ nmap ]<Space> <Plug>(PutBlankLinesBelow) " \a toggles 'formatoptions' 'a' flag using a plugin nnoremap <Leader>a :<C-U>ToggleFlagLocal formatoptions a<CR> -" \b toggles copy-pasteable linebreak settings +" \b toggles settings friendly to copying and pasting nmap <Leader>b <Plug>(CopyLinebreakToggle) " \c toggles 'cursorline'; no visual mode map as it doesn't work @@ -324,13 +326,13 @@ nnoremap <Leader>H :<C-U>history :<CR> " \i toggles showing matches as I enter my pattern nnoremap <Leader>i :<C-U>set incsearch! incsearch?<CR> -" \j jumps to buffers (jetpack) +" \j jumps to buffers ("jetpack") nnoremap <Leader>j :<C-U>buffers<CR>:buffer<Space> " \k shows my marks nnoremap <Leader>k :<C-U>marks<CR> -" \l toggles showing tab, end-of-line, and trailing whitespace +" \l toggles showing tab, end-of-line, and trailing white space nnoremap <Leader>l :<C-U>setlocal list! list?<CR> xnoremap <Leader>l :<C-U>setlocal list! list?<CR>gv @@ -417,10 +419,10 @@ nnoremap <Leader>. :<C-U>lmake!<CR> nnoremap <Leader><lt> :<C-U>'[,']<lt><CR> nnoremap <Leader>> :<C-U>'[,']><CR> -" \_ uses last changed or yanked text as a characterwise object +" \_ uses last changed or yanked text as an object onoremap <Leader>_ :<C-U>normal! `[v`]<CR> -" \% uses entire buffer as a linewise object +" \% uses entire buffer as an object onoremap <Leader>% :<C-U>normal! 1GVG<CR> " \{ and \} move to lines with non-space chars before current column |