Last active
October 11, 2016 19:19
-
-
Save schoettl/43fe190327df0bf31829df5549590782 to your computer and use it in GitHub Desktop.
Vim mapping with range
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 characters
function! ExportAndOpenHtml() range | |
execute a:firstline . ',' . a:lastline . 'TOhtml' | |
execute 'silent !xdg-open %' | |
quit | |
redraw! | |
endfunction | |
nnoremap <Leader>h :0,$call ExportAndOpenHtml()<CR> | |
vnoremap <Leader>h :call ExportAndOpenHtml()<CR> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment