Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Editing in a vim editor

 
Joe Harry
Ranch Hand
Posts: 10123
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

When I opened my sources.list file and edited it, how could I save it? I simply closed it after typing in something and when I opened it the next time, it gave me a message saying that a swap file...recover...blah...blah...blah. How to save my changes in the vim editor?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By typing ":w". ":wq" will save and exit.

Most VIM versions also have standard GUI menus with the corresponding keystrokes.
 
Joe Harry
Ranch Hand
Posts: 10123
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the vim editor shipped along with a normal Ubuntu installation or do we have to get it downloaded manually? If we have to download it manualy, is it a paid version? or a freeware?
 
Joe Ess
Bartender
Posts: 9280
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
VI is "the" Unix editor. You are practically assured of having it on a Unix or Unix-like system. VIM is "VI iMproved".

Vim is charityware. Its license is GPL-compatible, so it's distributed freely, but we ask that if you find it useful you make a donation to help children in Uganda through the ICCF.

About VIM

Here is a handy cheat-sheet for VI.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic