How to get a syntax-highlighting code text

来源:互联网 发布:tensorflow 分割 编辑:程序博客网 时间:2024/05/29 08:35

vim provide a function to covert current code view to a html page.

 

  1. open your code file with gvim
  2. execute :set syntax=c for example to assign the highlight scheme.
  3. execute “Convert to HTML” in “Syntax” menu.
  4. save the generated html page.

vim确实是个强劲的编辑器,我在unix下面都用它,vim也有windows的版本。

http://www.vim.org/