vi Editor¶
View a file¶
- Open a file:
vi <file name> - Close the file by typing
:qand pressENTER
Edit/Create a file¶
- Open or create a file:
vi <file name> - Press
ito activate the insert mode - Navigate to the right location using the arrow keys:
←↑→↓ -
Modify or add some content
Note
Use
CtrlShift+candCtrlShift+vfor copy/paste content in thevieditor`. -
Press
ESCto exit the insert mode - Store and close the file by typing
:wqand pressENTER