Category Archives: vi

basic vi commands

Command mode:
dd – cut/delete a line
yy – copy a line
p – paste text
o – create a new line below the cursor
O – create a new line above the cursor

Line mode:
w – save the file
wq – save the file and quit
x – save the and quit
q – quit the file
q! – quit the file disregarding any changes