Projekt

Allgemein

Profil

Aktionen

vim

vim is installed by default

basic vim usage

the most vim-style way of getting help for vim is starting vim and entering :help

for doing some basic editing the following sequences should be enough.

One edits a file in vim by issuing the command:

vim file-to-edit

The vim editor has three modes:
  • command mode letters or sequence of letters interactively command vim. Commands are case sensitive. The ESC key can end a command.
  • insert mode Text is inserted. The ESC key ends insert mode and returns you to command mode. One can enter insert mode with the "i" (insert), "a" (insert after), "A" (insert at end of line), "o" (open new line after current line) or "O" (Open line above current line) commands.
  • command line mode One enters this mode by typing ":" which puts the command line entry at the foot of the screen.

command mode

key action
x delete character under cursor
dd delete current line
yy copy (yank) current line
p paste
i change to insert mode

insert mode

edit text freely, press <ESC> when you are finished.

command line mode

key action
:help<enter> get help
:w<enter> save
:q!<enter> exit w/o saving
:wq<enter> exit w/ saving

Von Jeremias Keihsler vor fast 8 Jahren aktualisiert · 1 Revisionen