From e6af39490b2f223ef170623c0e3ca42adc8d9181 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 31 Aug 2018 22:27:55 +1200 Subject: Remove visual_block_suspend_wrap.vim This would be great if it was immediate and didn't require the CursorMoved event, but as it stands it's not really an improvement over just my \w mapping to toggle 'wrap'. --- vim/plugin/visual_block_suspend_wrap.vim | 43 -------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 vim/plugin/visual_block_suspend_wrap.vim diff --git a/vim/plugin/visual_block_suspend_wrap.vim b/vim/plugin/visual_block_suspend_wrap.vim deleted file mode 100644 index 75b87060..00000000 --- a/vim/plugin/visual_block_suspend_wrap.vim +++ /dev/null @@ -1,43 +0,0 @@ -" -" visual_block_suspend_wrap.vim: If 'wrap' is enabled, switch it off after the -" first movement in visual block mode, and put it back after the first -" movement after it's left. My kingdom for a VisualEnter event... -" -if exists('g:visual_block_suspend_wrap') || &compatible - finish -endif -if !exists('##CursorMoved') - finish -endif -let g:loaded_visual_block_suspend_wrap = 1 - -" Flag for whether we've suspended 'wrap' -let s:wrap_suspended = 0 - -" Function for checking mode and suspending or restoring 'wrap', if applicable -function! s:Check() abort - - " If this is visual block mode... - if mode() ==# "\" - - " ...and 'wrap' is set, suspend it and flag that we did. - if &wrap - setlocal nowrap - let s:wrap_suspended = 1 - endif - - " If it's some other mode, and we've suspended 'wrap' and it's not on, - " switch it back on and clear the flag - elseif s:wrap_suspended && !&wrap - setlocal wrap - let s:wrap_suspended = 0 - endif - -endfunction - -" Check the mode after each CursorMoved event, because there isn't a way to -" check for entering or leaving visual mode specifically -augroup visual_block_suspend_wrap - autocmd! - autocmd CursorMoved * call s:Check() -augroup END -- cgit v1.2.3 From 02d2f19ea6036f2be9fdf94bf0e53591a7003721 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 2 Sep 2018 23:27:00 +1200 Subject: Use \_ as Vim text object for `[,`] marks --- vim/vimrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vim/vimrc b/vim/vimrc index caa52867..640f334a 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -389,6 +389,9 @@ nnoremap . :lmake! nnoremap :'[,'] nnoremap > :'[,']> +" \_ uses last changed or yanked text as an object +onoremap _ :normal! `[v`] + " \{ and \} move to lines with non-space chars before current column nmap { (VerticalRegionUpNormal) nmap } (VerticalRegionDownNormal) -- cgit v1.2.3 From e766d8afa2b1fdd84a53683685ec8140899747ce Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 4 Sep 2018 11:42:03 +1200 Subject: Comment to explain \c,\C mappings --- vim/vimrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 640f334a..3eb6236f 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -255,9 +255,9 @@ nnoremap a :ToggleFlagLocal formatoptions a " \b toggles copy-pasteable linebreak settings nmap b (CopyLinebreakToggle) -" \c toggles 'cursorline' +" \c toggles 'cursorline'; no visual mode map as it doesn't work nnoremap c :setlocal cursorline! cursorline? -" \C toggles 'cursorcolumn' +" \C toggles 'cursorcolumn'; works in visual mode nnoremap C :setlocal cursorcolumn! cursorcolumn? if exists(':xnoremap') xnoremap C :setlocal cursorcolumn! cursorcolumn?gv -- cgit v1.2.3 From d717261a486de2b345cbdd479745ee3f85820460 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 4 Sep 2018 11:46:26 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index e1e9348a..4f8ec31c 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v1.65.0 -Thu Aug 30 01:55:50 UTC 2018 +tejr dotfiles v1.66.0 +Mon Sep 3 23:46:26 UTC 2018 -- cgit v1.2.3