Skip to content

Instantly share code, notes, and snippets.

@ChoiZ
Forked from mattratleph/vimdiff.md
Last active August 29, 2015 14:00
Show Gist options
  • Save ChoiZ/11364976 to your computer and use it in GitHub Desktop.
Save ChoiZ/11364976 to your computer and use it in GitHub Desktop.
Vim Diff / Visual Block

vim cheat sheet

##vimdiff commands

]c :        - next difference
[c :        - previous difference
do          - diff obtain
dp          - diff put
zo          - open folded text
zc          - close folded text
:diffupdate - re-scan the files for differences

##visual block

1. `ctrl+v` activate VISUAL BLOCK mode.
2. select a word in one or many lines.
3. use:
    `d` to delete the word.
    `shift+i` to insert BEFORE this word.
    `shift+a` to insert AFTER this word (Append).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment