Setting global and confirm flags as default for Vim search and replace -
when use vim's search , replace, use global , confirm flags demonstrated in following lines:
:%s/foo/bar/gc :5,10s/foo/bar/gc :+10s/foo/bar/gc is there way make g & c flags default vim's search , replace?
you can set gdefault (see :help 'gdefault') in vimrc i'm not sure confirmation part.
you try custom mapping one:
nnoremap gs :/gc<left><left><left> that puts cursor between : , /, ready type rest.
Comments
Post a Comment