Wednesday, June 10, 2009

HOTO: Create html "snapshot" from your gvim editor

Here is my .vimrc snippet that allows me to quickly save off a file in an HTML format with all of the syntax highlighting, etc..

The function is not working.. :( will have to work on it more later...


" Settings for :TOhtml
let html_number_lines=1
let html_use_css=1
let use_xhtml=1

""function not working
"function! MyToHtml()
" normal :colorscheme default
" normal :TOhtml
" normal :colorscheme torte
"endfunction
"nmap <Leader>html :call MyToHtml()
nmap <Leader>html :TOhtml<CR>zR :w! ~/tmp/<C-R>%<CR> :q!<CR>
nmap <Leader>print :colorscheme default<CR> :TOhtml<CR>zR :w! ~/tmp/<C-R>%<CR> :q!<CR>zR:colorscheme torte<CR>

No comments:

Post a Comment