September 1, 2015
'(Vim Bare Essentials for Editing Lisp)
Audience: beginners
Vim can feel daunting when you first hop into it. But there’s not all that much you need to learn in order to be able to do very powerful operations with complex code. This is a whirlwind tour of the essentials of Vim for total noobs to competently edit things with lots of parentheses.
Navigation
hjkl w b e W B E
C-f C-b C-e C-y
gg G 12G H M L zz
( ) { }
Insert mode
i a o/O Esc
C-w C-h
Count operators
4w 12j
Search mode
f F / * n N
Delete/Change/Yank
d c y dw c2W yf; p P
r R
Command mode
: :w :q :wq :x :e
Files
:w myfile % #
Buffers
:ls ]b [b
Options
:set coi cos cox
Save options
:e ~/.vimrc :w
Objects
in
and around
iw aw if
Special
J u C-r ma 'a C-l C-g >> << r R ~
Help
:h :h foo :h fo<C-d> :h fo K C-] C-t
Surround
Slime
<C-c-c>
Settings
set nocompatible set exrc set autowrite set tabstop=2 set shiftwidth=2 set backspace=2 set history=500 set ruler set showmode set showcmd set showmatch set hlsearch set mousehide set autoindent set incsearch set textwidth=78 set wrap set encoding=utf8 set relativenumber set number set numberwidth=1 set laststatus=2 set switchbuf=split set ignorecase set lisp