Skip to content

Instantly share code, notes, and snippets.

View alpinskiy's full-sized avatar
💭
Don't try to be clever

Mikhail alpinskiy

💭
Don't try to be clever
View GitHub Profile
@alpinskiy
alpinskiy / sortreg.vim
Created July 4, 2012 14:37
Snippets to compare Windows Registry (version 5.0) *.reg files
" Delete large binary data blocks
g/ \x\{2}\(,\x\{2}\)*\(,\\\)\=/ d
" Sort values inside [] sections
g/\[*\]\n\p/+1,/^$/-1 sort
" Join section [] content together with $
g/\[*\]\n\p/,/^$/-1 s/$\n/ $ /
" Delete empty lines
%s/^$\n//