meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
linux:tools:vim [2026/06/09 10:38] – titannetlinux:tools:vim [2026/06/09 10:59] (current) – titannet
Line 11: Line 11:
 |''i''|''a''| Insert mode at or after cursor | |''i''|''a''| Insert mode at or after cursor |
 |''d''|''dd''| Delete, delete line | |''d''|''dd''| Delete, delete line |
 +
 +==== Extended ====
 +
 |''u''|| undo | |''u''|| undo |
 +|''/pattern''|''?pattern''| search forwards, backwards|
 +|''n''|''N''| Continue search
  
 ==== Copy / paste ==== ==== Copy / paste ====
Line 19: Line 24:
 |''''| |  | |''''| |  |
 |''''| |  | |''''| |  |
 +
 +===== Minimal .vimrc =====
 +
 +<code bash>
 +"+y #copy a selection to the system clipboard
 +"+p #paste from system clipboard
 +
 +set nocompatible            " Modernes Verhalten statt original Vi
 +filetype plugin indent on
 +
 +set autoindent
 +set ts=4
 +filetype on
 +
 +syntax on
 +" Darstellung & Nummerierung
 +set number                  " Zeilennummern anzeigen
 +set relativenumber          " Zeilennummern relativ zum Cursor anzeigen
 +set showcmd                 " Unvollständige Befehle in der Statusleiste anzeigen
 +set wildmenu                " Bessere Tab-Vervollständigung für Befehle
 +
 +" Suchen
 +set hlsearch                " Suchergebnisse hervorheben
 +set incsearch               " Live-Suche während der Eingabe aktivieren
 +set ignorecase              " Groß-/Kleinschreibung bei der Suche ignorieren
 +set smartcase               " Großschreibung erzwingen, wenn Großbuchstaben enthalten sind
 +
 +" Tabs und Einrückung
 +set tabstop=4               " Tabulator entspricht 4 Leerzeichen
 +set shiftwidth=4            " Einrückungstiefe ebenfalls 4 Leerzeichen
 +set expandtab               " Tabs in Leerzeichen umwandeln
 +set autoindent              " Automatische Einrückung für neue Zeilen
 +
 +" Verhalten
 +set backspace=indent,eol,start " Korrektes Löschen mit der Backspace-Taste
 +set hidden                  " Puffer ohne Speichern im Hintergrund behalten
 +</code>
  
  
Line 128: Line 170:
 zw Mark word as bad/misspelling zw Mark word as bad/misspelling
 zu / C-X (Insert Mode) Suggest words for bad word under cursor from spellfile zu / C-X (Insert Mode) Suggest words for bad word under cursor from spellfile
 +
 +
 +==== File Tabs ====
 +
 +
 +    :e filename - Edit a file
 +    :tabe - Make a new tab
 +    gt - Go to the next tab
 +    gT - Go to the previous tab
 +    :vsp - Vertically split windows
 +    ctrl+ws - Split windows horizontally
 +    ctrl+wv - Split windows vertically
 +    ctrl+ww - Switch between windows
 +    ctrl+wq - Quit a window
 +