Vim

Cheatsheet vim

Code formatting :set list, \l - show invisibles :retab! - auto converting between tabs and spaces :set expandtab, retab! - to spaces :set noexpandtab, retab! - to tabs . - repeat Normal mode h, j, k, l - left, down, up, right gj - go down display line gk - go up display line 0 - to the first character of real line g0 - to the first character of display line ^ - to the first nonblank character of line g^ - to the first nonblank character of display line $ - to the end of real line g$ - to the end of display line w - forward to start of next word W - to the next WORD b - backward to start of current/previous word B - backward to start of current/previous WORD e - forward to end of current/next word E - forward to end of current/next WORD ge - backward to end of previous word gE - backward to end of previous WORD <number>G - to the line gg - beginning of the file G - end of the file ^G - show current line % - move to matching brackets f<char> - find next F<char> - find backward t<char> - find next char and place cursor before T<char> - find next char and place cursor before backward ; - go to the next of f/t , - go to previous of f/t g; - back to the last change g, - forward to the next change :changes - list changes {number}+ - go to the {number} lines down {number}- - go to the {number} lines up Marks m{a-zA-Z} - set a mark `{mark} - go to the exact mark place '{mark} - go the first non-whitespace character on where mark was set Automatic marks ` - Position before the last jump within current file .

Continue reading

Vim Kurz Referenz

Vim Editor Kurzreferenz Befehlsmodus Kommando Beschreibung i Insertmodus, damit kann man editieren Cursortasten navigieren h, j, k, l navigieren, wenn Cursortasten tod sind G letzte Zeile Dokument nG gehe zu Zeile n dd Zeile löschen (in Zwischenablage) yy Zeile in Zwischenablage nyy n Zeilen in Zwischenablage p Zwischenablage einfügen unterhalb /Muster Suche nach Muster n Suche wiederholen set ic Umschalten Suche “ignore case” set noic Umschalten Suche case sensitiv :1,$s/from/to/gc Ersetze from nach to im ganzen Dokument mit Nachfrage Strg+G Aktuelle Zeilennummer und Dateiname anzeigen :n Nächste Datei bearbeiten :rew Vorherige Datei bearbeiten :w Datei speichern :q Editor verlassen u Undo . letzte Änderung wiederholen Editiermodus Kommando Beschreibung ESC zurück in Befehlsmodus Cursortasten navigieren Vim Auführlicher Navigieren Kommando Beschreibung Cursortasten navigieren h, j, k, l; navigieren, wenn Cursortasten tod sind 1G erstes Zeile Dokument G letzte Zeile Dokument nG Gehe zu Zeile n (Bsp: 20G) 0 erstes Zeichen Zeile, wie Pos1 $ letztes Zeichen Zeile w Nächstes Wort. Anfang des Wortes. (auch W) b Vorheriges Wort. Anfang des Wortes. (auch B) e Nächstes Wort, Wortende. (auch E) ) Nächster Satz. ( Vorheriger Satz. } Nächster Absatz. { Vorheriger Absatz. Return Erstes nicht leeres Zeichen nächste Zeile n| Spalte n aktuelle Zeile Strg-F/Page-Down Seite vorwärts.

Continue reading