Vim Survival Guide
Linux
HOGENT toegepaste informatica
Thomas Parmentier, Andy Van Maele, Bert Van
Vreckem
2024-2025
The editor wars
https://xkcd.com/378/
Vim vs Nano
- Nano = default editor on Mint (& Ubuntu, …)
- Niet altijd beschikbaar! (bv. servers)
- ed (1973) > ex (1976) > vi (1976) > Vim (1991)
- Vi is standaard
- POSIX
- Single UNIX Specification
Vim
- Vi Improved, Bram Molenaar
- Altijd aanwezig in Linux, MacOS
- “Modal editor”
- Insert mode = tekst invoeren
- Command mode = tekst bewerken
- Efficiënte toetsenbordinvoer
- Handen blijven centraal op toetsenbord
- Krachtige commando’s
Essentiële Vim-commando’s
$ vim <bestand>
- Bij opstarten van Vim kom je terecht in normal mode.
- Als je tekst wil invoeren moet je naar insert mode.
Normal mode -> insert mode |
i |
Insert mode -> normal mode |
<Esc> |
Opslaan |
:w |
Opslaan en afsluiten |
:wq |
Afsluiten zonder opslaan |
:q! |
Steep learning curve, great tool!
$ sudo apt install vim-runtime # Op Debian
$ sudo dnf install vim-enhanced # Op RedHat
$ vimtutor