代码之家  ›  专栏  ›  技术社区  ›  Julian Birch

有没有办法将vim中的语法颜色文件复制为html?

vim
  •  18
  • Julian Birch  · 技术社区  · 15 年前

    我在vim中加载了几个文件,但我想用vim提供的颜色发布内容。缺少打印屏幕,有没有办法做到这一点?理想情况是以HTML格式复制/粘贴,但我怀疑我会失望的。

    3 回复  |  直到 13 年前
        1
  •  26
  •   Martin Broadhurst    15 年前

    :TOhtml
    
        2
  •  6
  •   ZyX    15 年前

    :TOhtml format.vim

        3
  •  3
  •   dash-tom-bang    13 年前

    " open the selection in Internet Explorer so it can be copied as rich text
    function! OpenInIE() range
        execute a:firstline . "," . a:lastline . 'TOhtml'
        silent !start "C:\Program Files (x86)\Internet Explorer\iexplore.exe" %:p
        sleep 2
        silent !del %:p
        q!
    endfunction
    

    noremap <F7> :call OpenInIE()<CR>