Free Hosting Online for WorkStations

< Previous | Contents | Next >

Saving Our Work

To save the change we just made to our file, we must enter an ex command while in com- mand mode. This is easily done by pressing the “:” key. After doing this, a colon charac- ter should appear at the bottom of the screen:



:

:


To write our modified file, we follow the colon with a “w” then Enter:



:w

:w


The file will be written to the hard drive and we should get a confirmation message at the bottom of the screen, like this:



"foo.txt" [New] 1L, 46C written

"foo.txt" [New] 1L, 46C written


Tip: If you read the vim documentation, you will notice that (confusingly) com- mand mode is called normal mode and ex commands are called command mode.



Beware.



Top OS Cloud Computing at OnWorks: