Vim

Vim is a text editor based on vi. It can be used from the command line or as a standalone application with graphical user interface. The name Vim comes from Vi IMproved.

Installation
If you want to install Vim with both the ncurses-based interface for the terminal and the graphical interface for X, just type:

If you are only interested in using Vim in a terminal, type

Extensions
The category app-vim provides a lot of additional syntax definitions, plugins and other Vim related stuff.

Getting started
Vim has a built-in tutorial which should require around 30 min to go trough. Start it using command:

Modes
Vim has 3 modes:
 * Command mode: Keystrokes are interpreted as commands
 * Insert mode: Keystrokes are interpreted as text (except a few special commands)
 * Visual mode: Visual mode supports you by selecting some text. It behaves a lot like command mode

Use vim sed from commandline
Change all startlines from file.txt to startlines with #: {{Cmd|vim -c ":%s/^}/#}/g" -c ":x" file.txt}}

Change encoding of file to UTF-8:

Use vim sed in commad mode
Change all startlines in opened file to startlines with #:

Reload a file with UTF-8:

External References

 * VIM Homepage
 * Vim Documentation Includes Manuals (aka ":help" and Free VIM OPL Book), FAQS, HOWTO's, Tutorials, in HTML, PDF, PS formats.
 * VIM Scripts/Plugins
 * Learning the vi and Vim Editors, 7th Edition O'Reilly  Print ISBN: 978-0-596-52983-3, Ebook ISBN: 978-0-596-15935-1