vim filename.txt
:w
or :write
in normal mode:q
or :quit
in normal mode:q!
or :quit!
in normal mode:wq
or :x
in normal modeCtrl + f
in normal modeCtrl + b
in normal mode/
in normal mode, then enter the text to search and press Enter:%s/old/new/g
in normal mode, where old
is the text to be replaced, and new
is the new textn
in normal modeN
in normal mode:q!
or :quit!
in normal mode