Vim: Repeat everything
In Vim, you could repeat almost everything.
-
.to repeat last change action in normal mode -
@:to repeat last command-line change -
@@to repeat last macro -
n,Nto repeat searches -
&to repeat substititution -
:&&to repeat substititution with the same flags -
g&to repeat substititution globally - repeat.vim to repeat some of not native commands
P.S. Happy coding!
Written by Anton Kalyaev
Related protips
1 Response
[Optionally] Add this to your .vimrc to always preserve flags when using &:
" make & trigger :&& so it preserves flags
nnoremap & :&&<Enter>
xnoremap & :&&<Enter>
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#