2. ● Vim comes with most Linux distros and
OS X
● vimrc - allows customization(config file)
● Pathogen - easily install vi plugins
https://github.com/tpope/vim-pathogen
drop .vim plugin files into ~/.vim/bundle
● map caps lock key to Esc
Getting Started
3. ● config settings like:
- ignorecase
- shiftwidth
- syntax highlighting
- tab navigation
- leader character mappings
Let’s take a look at my vimrc
.vimrc wizardry
5. ● verbs: c (change), d (delete), y
(yank/copy)...and more
● modifiers: i (inside), a (around), t (till..finds
a character), f (find..like till except
including the char)
● text objects: w (word), s (sentence), b
(block/parentheses), symbols(e.g. “ or ())
Grammar
6. ● Command mode
● Insert mode
● Visual mode
Let’s do some examples
Vim Modes
7. ● provides quick shortcuts for tedious
commands
● kind of like aliases from the command line
Let’s create one
Leader Character
8. ● lightweight and fast, no lag
● vi/vim is on most remote servers
● never need your mouse
● great for front-end apps
● keeps you sharp!(syntactically)
● It’s a blast! Sort of like playing a video game while
you work
Why use Vim?
9. ● allows you to record and execute a sequence of
operations
● record macro(in command mode):
- type q to start a recording
- type any lowercase letter or #(to assign your
recording to a register)
- perform your operations
- type q to stop recording
● execute macro:
- <n>@<macro register> (e.g. 10@q)
Macros