Link: Emacs
Book
Practical Vim
Practical guide of vim.
Vim keybinding shortcut
Overall meaning: w: word e: end
Move
0 | jump to beginning of (visual) line |
---|---|
g | jump to end of line |
^ or _ | jump to beginning of line |
Edit
I | insert at the beginning of line |
---|---|
A | insert at the end of line |
x | delete at the cursor |
O | create new line above |
Surround.vim
For Emacs, install evil-surround - MELPA
Add parenthesis
How to add parenthesis like () around highlighted text in visual mode:
- Select the text in visual mode, e.g.
viw
to highlight a word Sb
orS)
to insert bracket wo space;S(
to insert bracket with space surrounding
Edit existing parenthesis
- Change parens: e.g.
cs"'
change parens from ” to ’ - Delete parens:
ds"
delete surrounding ”