Showing posts with label vi. Show all posts
Showing posts with label vi. Show all posts

Thursday, June 7, 2012

Basic vi text editor commands

As the Nano editor unfortunately has been taken out of the ESXi 5.0 shell, we're left with good old vi.

Here's some basic commands:

Opening a text file:

vi filename

vi opens in Command mode. You can move the cursor around in the file but not edit it. To switch edit mode press 'i' (you can see that a '-' symbol at the bottom of the console changes to an 'I'). To switch back to Command mode press 'Esc'.

To save:

:w

To quit:

:q!

See this link for more info