Vim Tips and Tricks
As I learn more about vim, I plan to document the tips and tricks I learn here.
Add the following into your .vimrc file:
set tabstop=4 set shiftwidth=4 set expandtab
set spell spelllang=en_us
This is a list of some common commands when using vimdiff:
- ctrl w (twice)
- switch windows
- diff obtain, take the other window's differences. Pull the change.
- diff put, give the other window our differences. Push the change.
- move focus to previous difference.
- move focus to next difference.
- diff update
- :diffget <window number>
- get changes from specified window number and place them into current window.
- :diffput <window number>
- put changes from current window into specified window number.
- open folded text
- close folded text