So I’m an avid vim user. I just wanted to write this down to remind myself, or as Gary Bernhardt expresses it
Store it into my muscle memory!
Vim have registers. So when ever you perform an action of
the selection is stored in a register.
You chose a register with
"<name of register> and from there you can
do your motion, yank or whatever action you desire.
You can list your register content with
This is the default register, and vim will use this if you don’t specify a register.
Vim has a named register for each of the letters in the alphabet. So you can
"ay, or paste
Sometimes you don’t want to store the text you manipulate, if you send it to
"_ it will not be stored.
This will store the text in the default X11 clipboard, pretty handy!
This will store the text in the X11 selection clipboard, pretty handy! Note this will be the same as the system clipboard on windows or OSX, since there is only one clipboard.
This register is different, since vim drops into commandline mode, and reads the input from the script you execute.
Here are the rest of the registers:
||Last search pattern|
||Last Ex command|
||Last inserted text|
I hope you’ll enjoy some more productivity in vim using registers!