How to edit files in a terminal with vim?

Posted by andrew.46 on Ask Ubuntu See other posts from Ask Ubuntu or by andrew.46
Published on 2014-05-30T07:52:40Z Indexed on 2014/05/30 9:38 UTC
Read the original article Hit count: 238

Filed under:
|

It is not always possible to edit and create files in a terminal and I would like to get the answers to the basics of manipulating files in a terminal using vim under Ubuntu Linux. Specific questions I have are:

  1. How can I open text files for editing?
  2. How can I save the file?
  3. How can I save the file with a different name?
  4. How can I leave the file without saving the changes?
  5. What settings are best in my configuration file and where is this file?
  6. How do I set the colors for vim?
  7. How do I show line numbers in vim and can this be toggled?

A lot of questions here but I believe these questions and their answers should cover basic vim usage...

© Ask Ubuntu or respective owner

Related posts about command-line

Related posts about vim