edit text file with vim code example

Example 1: linux edit file

sudo nano filename.ext

Example 2: vim insert

i - insert before the cursor

I - insert at the beginning of the line

a - insert (append) after the cursor

A - insert (append) at the end of the line

o - append (open) a new line below the current line

O - append (open) a new line above the current line

ea - insert (append) at the end of the word

Example 3: edit in vim

Press i letter on your keyboard to start editing (Insert Mode). When youre done press the ESC key to exit insert mode