Last active
February 7, 2020 02:54
Revisions
-
yt-siden renamed this gist
Jul 28, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
yt-siden revised this gist
May 18, 2015 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains 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 charactersOriginal file line number Diff line number Diff line change @@ -4,9 +4,10 @@ function! s:insert_include_guard() let s:uuid=system('uuidgen') let s:uuid=strpart(s:uuid, 0, strlen(s:uuid)-1) let s:uuid=substitute(s:uuid, '[a-f]', '\u\0', 'g') let s:uuid=substitute(s:uuid, '\-', '_', 'g') let s:uuid='UUID_'.s:uuid call append(0, '#ifndef '.s:uuid) call append(1, '#define '.s:uuid) call append('$', '#endif //'.s:uuid) endfunction command! -nargs=0 InsertIncludeGuard call s:insert_include_guard() -
yt-siden created this gist
May 14, 2015 .There are no files selected for viewing
This file contains 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ " C/C++ insert UUID based include guard function! s:insert_include_guard() let s:uuid=system('uuidgen') let s:uuid=strpart(s:uuid, 0, strlen(s:uuid)-1) let s:uuid=substitute(s:uuid, '[a-f]', '\u\0', 'g') let s:uuid='UUID-'.s:uuid call append(0, '#ifndef '.s:uuid) call append(1, '#define '.s:uuid) call append('$', '#endif //'.s:uuid) endfunction command! -nargs=0 InsertIncludeGuard call s:insert_include_guard()