aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-09-04 11:46:26 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-09-04 11:46:26 +1200
commit8026190c39d8cecdd7179cb1db35e0c72c1f4340 (patch)
tree6a3c49871876d9696bc8e8341e5f62d89d74f2c7 /vim/vimrc
parentMerge branch 'release/v1.65.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-8026190c39d8cecdd7179cb1db35e0c72c1f4340.tar.gz
dotfiles-8026190c39d8cecdd7179cb1db35e0c72c1f4340.zip
Merge branch 'release/v1.66.0'v1.66.0
* release/v1.66.0: Bump VERSION Comment to explain \c,\C mappings Use \_ as Vim text object for `[,`] marks Remove visual_block_suspend_wrap.vim
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc7
1 files changed, 5 insertions, 2 deletions
diff --git a/vim/vimrc b/vim/vimrc
index caa52867..3eb6236f 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -255,9 +255,9 @@ nnoremap <Bslash>a :<C-U>ToggleFlagLocal formatoptions a<CR>
" \b toggles copy-pasteable linebreak settings
nmap <Bslash>b <Plug>(CopyLinebreakToggle)
-" \c toggles 'cursorline'
+" \c toggles 'cursorline'; no visual mode map as it doesn't work
nnoremap <Bslash>c :<C-U>setlocal cursorline! cursorline?<CR>
-" \C toggles 'cursorcolumn'
+" \C toggles 'cursorcolumn'; works in visual mode
nnoremap <Bslash>C :<C-U>setlocal cursorcolumn! cursorcolumn?<CR>
if exists(':xnoremap')
xnoremap <Bslash>C :<C-U>setlocal cursorcolumn! cursorcolumn?<CR>gv
@@ -389,6 +389,9 @@ nnoremap <Bslash>. :<C-U>lmake!<CR>
nnoremap <Bslash><lt> :<C-U>'[,']<lt><CR>
nnoremap <Bslash>> :<C-U>'[,']><CR>
+" \_ uses last changed or yanked text as an object
+onoremap <Bslash>_ :<C-U>normal! `[v`]<CR>
+
" \{ and \} move to lines with non-space chars before current column
nmap <Bslash>{ <Plug>(VerticalRegionUpNormal)
nmap <Bslash>} <Plug>(VerticalRegionDownNormal)