SoftLayer Technologies (tm)
Divider Forums Divider Portal Divider SPacer Divider About Divider KnowledgeLayer Divider InnerLayer
 
Knowledgebase Home | Favorites Knowledgebase Home | Favorites
Search the Knowledgebase Browse by Category
The VI Editor
VI is a very verbose and useful text editor. There are litterally hundreds of commands for VI that can further streamline the process of editing text files through the command line. Some of the basic commands are as follows:

#vi filename.txt
Opens the specified filename in a vi session. If the file does not exist, a blank document is created with that filename

#i
Moves vi to INSERT mode, where text can be added or deleted.

#Esc
The escape key moves vi back to Command mode, Where most letters entered will be interpreted as commands. Text cannot be edited from Command mode.

#:
This will enter vi into Line Mode, where line oriented commands can be used. A very basic command would be #:1 , which would return you to the first line of the file.

#/
The / can be used to search a file for matching text. If multiple entries are found, 'n' will cycle to the next entry in the file.

#a
The 'a' command will append starting one space to the right of the cursor.

#q
Quit without saving changes. This command requires Line mode

#x
Write changes and quit. This command requires line mode.
More extensive documentation on the vi editor can be found online through various websites.

Related Articles
No related articles were found.
Attachments
No attachments were found.
Home | Dedicated | Cloud | Solutions | Services | Facilities | Reseller | Resources | News | About | Specials | Contact | Legal
©2008 SoftLayer Technologies, Inc.