Vi (en)

Aus Gemini-Wiki
Zur Navigation springen Zur Suche springen
Deutsch.png - in Deutsch English.png - in English

The Vi is a long-term Linux-/Unix editor, which is available in most Linux systems by default.

Therefore it is good to get involved with this tool (as with the Midnight Commander). Because it makes no sense to use any windows tool, when the system has everythin "on board". And this is the case for different systems: Dreamboxes, NAS or other systems.

Usage

The easiest way to use Vi is:

  • 1. Open the file, or create a new one with vi path_to_the_file/file_name e.g.:
vi /etc/auto.network

Here the file auto.network is opened, or created in the directory /etc


  • 2. Press always the Esc key in Vi. This way you are always in a defined start position to enter commands.


  • 3. Press the i key for input

now you can click the right mouse button in the vi window. A text from the clipboard will be copied, or you can edit the file.
It is possible to navigate in the lines with the arrow keys.

  • 4. Saving the file is done as follows
Press the Esc key
enter :wq! 

The Ecs key is used to get into the command mode of Vi.
:wq! stands for: write quit and forces a save if needed.
If something goes wrong, it's always possible to press Esc and enter :q!.
This way, nothing is saved, and you can restart....

Manuals

Of course, Vi offers many more commands. Look into the internet for a good manual.