Karl Castillo
@koralarts
@koralarts
@koralarts
How Do I Exit Vim? An
Introduction To Vim
Vi Improved
The mostly terminal-based text editor found in most machines.
Originally released for the Amiga in 1991, many versions of it for different operating systems have been released since then.
The 4 Modes of Vim
- Normal
- Command
- Visual
- Insert
Normal Mode Commands
- i - Go into Insert Mode
- v - Go into Visual Mode
- u - Undo most recent edit to the file
- w - Go forward to the start of a word
- b - Go backward to the start of a word
- 0 - Go to the beginning of the line
- $ - Go to the end of the line
- dd - Delete current line
Command Mode Commands
- q - Quit
- q! - Quit while discarding any edits to the file
- w - Save
- wq - Save and Quit
- x - Save and Quit
Visual Mode Commands
-
>
- Shift text right -
<
- Shift text left -
y
- Copy text (yank) -
d
- Delete text -
~
- Toggle case
Searching
- /pattern - Search forwards
- ?pattern - Search backwards
- n - Next search result
- N - Previous search result
- %s/search_pattern/replace_with - Search and replace
- %s/search_pattern/replace_with/c - Search and replace with confirmation
Resources
When? Why?
How Do I Exit Vim? An Introduction to Vim
By Karl Castillo
How Do I Exit Vim? An Introduction to Vim
Small introduction to Vim used during my talk to introduce my colleagues to the magic of Vim.
- 176