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
Next revision
Previous revision
linux:tools:vim [2026/06/09 10:37] titannetlinux:tools:vim [2026/06/09 10:59] (current) titannet
Line 9: Line 9:
 |'':w''| | save | |'':w''| | save |
 |'':q''|'':q!'' | quit, confirm quit without saving | |'':q''|'':q!'' | quit, confirm quit without saving |
-|''ia''| Insert mode at or after cursor | +|''i''|''a''| Insert mode at or after cursor | 
-|''ddd''| Delete, delete line |+|''d''|''dd''| Delete, delete line | 
 + 
 +==== Extended ==== 
 + 
 +|''u''|| undo | 
 +|''/pattern''|''?pattern''| search forwards, backwards| 
 +|''n''|''N''| Continue search
  
 ==== Copy / paste ==== ==== Copy / paste ====
Line 18: 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 127: 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
 +