Reply to comment

Convert Source Code to HTML using vim

1. open your source code in vim
        go to Applications >>> Accessories >>> Terminal
        then type vim <codeFileName> then hit Enter
        e.g vim factorial.py
2. convert your code to readable html
       type :runtime! syntax/2html.vim then hit Enter
       note: be sure you are in command mode, if your in insert mode just press Esc
code2html
3. save the generated html file
       type :wq <filename.html> then hit Enter
       note: be sure you are in command mode, if your in insert mode just press Esc
       e.g. :wq factorial.html

You can now open the html page of your source code with your favorite web browser.

 

example output

colorizeSourceCode

Reply

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.