Note tips of Vi
Shortcuts
dd # delete a line
3dd # delete 3 lines
u # undo you last action
command + r # redo something
different ways to quit text
1
2
3:q # just quit
:q! # force quit without any changes
:wq # quit with saving changes
show row number
1
:set nu
search some string
1
/searchString
set to search in ignore case sensitive
1
2:set ic # ignore case
:set noic # not ignore casesearch and replace
1
:%s/stringPattern/youNeed/g
Sort lines
1
:startNum,endNum!sort # similarly we can do sort, awk, tr etc