aboutsummaryrefslogtreecommitdiff
path: root/vim/config/substitution.vim
blob: 415665ef9820c5421c5ad5f5c61ece0cb46b09ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
" Preserve the flags for a pattern when repeating a substitution with &; I
" don't really understand why this isn't a default, but there it is
nnoremap <silent>
      \ &
      \ :<C-U>&&<CR>

" Same again for visual mode; we use vnoremap rather than xnoremap to stay
" compatible with old Vims without doing eval() dances
vnoremap <silent>
      \ &
      \ :<C-U>&&<CR>