aboutsummaryrefslogtreecommitdiff
path: root/vim/config/substitution.vim
blob: 982d25f373a0cfee7788e000ff0b1a5da06f1d54 (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 :execute dances
vnoremap <silent>
      \ &
      \ :<C-U>&&<CR>