Vim Text editor - tips and tricks

Vim Text editor - tips and tricks in Linux OS

VIM Tricks

# move the current to the above line or swap the current line with previous one
ddkP

# copy all lines in a file
# % - next command to work on all lines
# y - yank those lines
# + - copy to the system clipboard
:%y+

# the other way of copying all lines of code
# gg - get the curser to the first line
# "*y - to start a yank command to the register * from the first line, until...
# G to go the end of the file
gg"*yG

#