VIM: Keep selection when using < or > in visual mode
When indenting or unindenting a code block, I normally visually select it and use < or >. However, both of these unselect the selection. The mappings make vim also do gv after such an action which re-selects the previous selection.
This commit is contained in:
parent
15b18a4a0a
commit
4d9c324cc7
4 changed files with 12 additions and 0 deletions
|
@ -71,3 +71,7 @@ nnoremap <leader>co :!opout <c-r>%<CR><CR>
|
|||
" Makes vim default to "very magic" searching
|
||||
nnoremap / /\v
|
||||
vnoremap / /\v
|
||||
|
||||
" Makes vim re-select visual selection when using < or >
|
||||
vnoremap < <gv
|
||||
vnoremap > >gv
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue