Skip to content

Instantly share code, notes, and snippets.

@v1m
Last active August 29, 2015 14:04
Show Gist options
  • Save v1m/c1831ed58ce42486c852 to your computer and use it in GitHub Desktop.
Save v1m/c1831ed58ce42486c852 to your computer and use it in GitHub Desktop.
vim script - CVE
"deletes all instances of the following
" CVE-ID: CVE-2007-0719
" and appends them to the bottom of the file
while search('^\s\+ CVE-ID:.\+$')
"/\s\+CVE-ID:\sCVE-\d\d\d\d.\+ $/ yank
"+1 put
"delete the matched text and append it to register K
delete K
" .d
"1 put
endwhile
"at the end of the file paste the contents of register K
$ put K
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment