Last active
August 29, 2015 14:04
-
-
Save v1m/c1831ed58ce42486c852 to your computer and use it in GitHub Desktop.
vim script - CVE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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