diff --git a/.config/vim/vimrc.d/40-keys.vim b/.config/vim/vimrc.d/40-keys.vim index c00f596..98760af 100644 --- a/.config/vim/vimrc.d/40-keys.vim +++ b/.config/vim/vimrc.d/40-keys.vim @@ -274,13 +274,15 @@ vnoremap utc s/\v(^\|[^0-9])\zs[0-9]{10}\ze([^0-9]\|$)/\=strftime(" " TODO: [count] sections? (see :h [[) nnoremap [[ m':call search('^\S.*{', "bW") vnoremap [[ m':exe "normal! gv"call search('^\S.*{', "bW") -nnoremap ]] m':call search('^\S.*{', "W") -vnoremap ]] m':exe "normal! gv"call search('^\S.*{', "W") +" map ]] here and remap ][ down below for better modularization +nnoremap ][ m':call search('^\S.*{', "W") +vnoremap ][ m':exe "normal! gv"call search('^\S.*{', "W") " Match the behaviour of [[ and []. ]] forward to next '}' in the first column " and ][ fw to next '[', instead of the other way around. noremap ]] ][ -noremap ][ ]] +" TODO: fix this with the relaxed mappings by evaluating the current rhs of ]] +" nmap ][ ]] " Strip trailing whitespace nnoremap silent! %s/\v\s+$//