Skip to content

Instantly share code, notes, and snippets.

@elit8888
Created November 1, 2019 09:30
Show Gist options
  • Save elit8888/ab3c7807ef67cd6e3f1d948d65079234 to your computer and use it in GitHub Desktop.
Save elit8888/ab3c7807ef67cd6e3f1d948d65079234 to your computer and use it in GitHub Desktop.
Vim - some useful keystroke

vimdiff

do  # apply diff from other pane
dp  # push diff to other pane
]c  # jump to next change
[c  # jump to previous change

vim

:g/pattern/p  # print matched lines
:%s/pattern//(g)n   # match count

Run macro across buffer (Assuming a key)

:bufdo execute "normal @a" | write
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment