Nov 22, 2022
Vim commands that I found interesting in editing codes: those that I forget a lot :(
How to specify a block of text: I use d
as an example, but other commands can use the scope too.
di(
- delete everything inside the current ()
.da(
- delete everything inside and including the current ()
.dta
- delete until a
(a
not included).dTa
- delete backwards until a
(a
not included).dfa
- delete until a
(a
included).dFa
- delete backwards until a
(a
included).d2ta
- delete until the second a
(the second a
not included).qa
- record macro for register a
.@a
- execute macro on register a
.2@a
- execute macro on register a
twice."ap
- paste the content of register a
."ay
- yank to register a
.