VIM Editor

Edit existing file

Step 1 type vim filename (edit the existing file named filename)

Step 2 move around the file using h/j/k/l key or any appropriate command

h Moves the cursor one character to the left

l Moves the cursor one character to the right

k Moves the cursor up one line

j Moves the cursor down one line

nG or :n Cursor goes to the specified (n) line

(ex. 10G goes to line 10)

Step 3 edit required text (replace or delete or insert)

Step 4 hit Esc key (exit from insert mode if you insert or replace text)

Step 5 type :wq