-
Notifications
You must be signed in to change notification settings - Fork 149
An Introduction to vi
mhogeweg edited this page Dec 23, 2012
·
2 revisions
The program vi is used to make text edits to files in this tutorial; it is the Linux version of Microsoft Notepad. While not the only option, it is probably the most popular, and it is natively available in every distro of Linux tested.
The two modes vi operates in are Edit mode and Command mode. Edit mode lets you make changes to the text in the file. Command mode lets you enter commands, such as save, quite, delete, or go to line. By default, vi opens in Command mode. Below is a table of commands that will make operating vi a lot easier.
Action | Command |
---|---|
Open file to edit in vi |
sudo vi <file name>
|
Open file in vi as read-only |
vi <file name>
|
Save changes and quit |
:wq
|
Quit without saving changes |
:q!
|
Delete text under cursor |
del key
|
Delete entire row |
dd
|
Insert text before character under cursor |
i
|
Insert text after character under cursor |
A
|
Insert text on a new line after current line |
o
|
Insert text on a new line before current line |
O
|
Go to specific line |
:<line number>
|
Exit edit mode |
Esc key
|
How to Set Up an Esri Geoportal Server on Linux | Perform Preinstallation Computer Setup | Set Up Systemwide Environment Variables | Install PostgreSQL 9.1.2 | Install Apache Tomcat 6 | Install Esri Geoportal Server | Configure geoportal User and Schema in the PostgreSQL Database | Deploy the Geoportal Web Application | Configure the gpt.xml File | Install the JDBC .jar Files | Log In to the Geoportal | Register ArcGIS for Server with the Geoportal