Tuesday, January 17, 2017

Vi Editor

Keys tips for using VI editor

yy        => Copy the entire line
P          => paste above the cursor
p          => paste below the cursor
dd       => Cut the entire line
ndd     => Cut n number of lines starting from cursor location
G         => Go bottom or last line of the file
A         => End of the line where cursor is located


:/serachword                                              => will search for the word
:/set nu                                                      => set numbers to the file
:%s/wordToFind/WordToReplace              => find and replace


No comments:

Post a Comment