Last active
September 11, 2018 05:07
-
-
Save ethagnawl/3ee7393a011782a06b0cd7d05aa450a8 to your computer and use it in GitHub Desktop.
format comic list entries
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
function! InsertHyphensAndUnderscores() | |
execute "normal! i- wi_f#gea_" | |
endfunction | |
function! InsertEmptyLines() | |
silent g/.\n\n\@!/norm o | |
endfunction | |
function! FormatComicListEntries() | |
execute "normal! gg^VG:sort\<CR>" | |
execute "normal! gg^VG:call InsertHyphensAndUnderscores()\<CR>" | |
execute "normal! gg^VG:call InsertEmptyLines()\<CR>" | |
endfunction | |
nnoremap <leader>fc :call FormatComicListEntries()<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment