Skip to content

Instantly share code, notes, and snippets.

@trohit
Last active January 15, 2017 06:53
Show Gist options
  • Save trohit/16383b0b8154dab8055c51a876ce3b29 to your computer and use it in GitHub Desktop.
Save trohit/16383b0b8154dab8055c51a876ce3b29 to your computer and use it in GitHub Desktop.
vimkhichdi.txt
#To replace empty lines
# replace empty trailing lines
%s/\S\zs\s\+$//g
# replace empty lines with spaces
%s/\s\+$//g
# to add some content 'grep -v..' at the end of each line matching a a pattern (eg. that starts with zgrep...)
:g/^zgrep.*/s/$/ | grep -v ':0'
@trohit
Copy link
Author

trohit commented Jan 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment