Knowledgebase Home | Glossary | Favorites Knowledgebase Home | Glossary | Favorites
VIM basics
Article Details

Last Updated
17th of August, 2010

Level
Intermediate

User Opinions (1 vote)
100% thumbs up 0% thumbs down

How would you rate this answer?
Helpful
Not helpful
Prerequisites:
Connecting to your Container via SSH
To start vim, ssh to your container and type:
vim filename.foo
Vim is a powerful text based editor for Linux/Unix based operating systems. Much can be done with it, but we want to focus on the basics, as vim isnt intuitive right off the bat. Basically there are two operation modes in Vim:
  • Command mode
  • Insert mode
Initially Vim starts at the command mode where any input will be treated as a part of the command. To append/insert the characters into the file you must enter insert mode first. There are many different insert modes, but we'll mainly be talking about the most basic.  The following key shortcuts will take you into different types of insert mode:

i -  will put you in the most basic insert mode. Whereever the cursor lies is where you will begin typing.
a - will put you in append mode. When this mode is enabled your cursor will enter insert mode one character to the right.
u - while in command mode will undo the last change you made.
hit Esc to exit insert mode and to enter command mode.

To save the contents of your file and quit vim, while in command mode type
:wq
(Note- you must type the colon here.)

This is a very basic explainiation of how to use the Vim editor. To learn more of the modes/commands in vim, go here
Visitor Comments
  1. Comment #1 (Posted by Lynell)
    You mean I don't have to pay for expert advice like this anyrmoe?!
  2. Comment #2 (Posted by Cassandra)
    If time is money you've made me a waetlhier woman.
Post Comment for "VIM basics "
To post a comment for this article, simply complete the form below. Fields marked with an asterisk are required.
   Your Name:
* Your Comment:
* Enter the code below:
 
Related Articles
No related articles were found.
Attachments
No attachments were found.

Continue