cat=input in console output=console

cat test=data in test. output is console

cat test >test1=data in test. copy to test1

cat test>>test1=data in test.append to test1

cat test=data typed in console, copied to test.


:set number, : set nonumber= to display line numbers

set showmode, : set noshowmode===to display insert or append mode


:w hello.txt,:wq, :q!, ZZ, :sh to execute shell commands temporarily(ctrl_d)

a,i,o,A,I,O,:r another_file_name, cw,s(one char with a string),S(rest of the line)

r=replace one char, R type over





yy,"z6yy,yw,"a8dd, "A8dd,"ap


                      %>>>>for line number 1 to last line.


                                 apple/orange  >>> apple by orange

                                 g >>>  all occurance in that line

  : .,.+10 s/apple/orange

            .  from the current line

            .+10  for the next 10+current lines

             s/apple/orange >>> replace apple by orange

             /g is missing : Hence only one occurance in each line to be replaced











vi editor cheat sheet