vim has something called registers which is like spaces that allow us to store text information and allow us to access it using its identifier
default registers
+
and*
system clipboard"
unnamed register where everything last yank/delete will be there
numbered registers
- vim automatic populate "0 to "9 where "0 is the latest yank/delete and the rest are the last 9 yank/delete
read only registry
".
last insert text":
last executed command"%
current file path
To see the registers
# see everythin in register
:reg
# see content of register b and c
:reg b c
named registers
# yank current line to registry b
"byy
# delete current line and save to b
"bdd
# yank current line and append to register b
"Byy
References:
https://www.brianstorti.com/vim-registers/
https://medium.com/vim-drops/vim-registers-the-powerful-native-clipboard-19b1c97891bd