Skip to content

Instantly share code, notes, and snippets.

@PeterRincker
PeterRincker / quick-replace.vim
Last active April 18, 2022 20:20 — forked from orlp/gist:8c25ed4abb36372bc6fe
Quick Replacements - gn with an n afterwards
" Quick Replace
" Makes *``cgn like workflows faster by automatically moving to next match. Repeat with `.`
"
" Requires repeat.vim
"
" Example mappings:
" nmap cm <Plug>(quick-replace)
" xmap C <Plug>(quick-replace)
"
" mnemonic: cm for change matches
@PeterRincker
PeterRincker / diff.md
Last active October 18, 2021 08:21 — forked from romainl/diff.md
:DiffOrig but smarter

:DiffOrig but smarter

This is an enhanced version of the snippet provided under :help diff-original-file.

Where the original :DiffOrig only shows differences between the buffer in memory and the file on disk, :Diff can be used in two ways:

  • against the file on disk, like the original, with:

    :Diff