Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to dump whatever is seen on the vim screen as it is, with colors and everything. Is there a way do to id. I am hoping that ncurses uses the same escape sequence for colors as bash. So when I'll do cat on the file that I've dumped the screen to, I should get the same output as the vim file.

I want to use it in the scenario when I am doing a side by side colorful diff of files and need to print them.

If anyone knows of any other side-by-side colorful diff programs, please feel free to mention in the comments (not answers because I am hoping that this question will be answered so that it can be used by others).


Thanks for TOhtml answer, but how do I do it if I'm in diff mode? I want both the side by side diffs to appear.

share|improve this question
    
mgdiff is a motif based graphical frontend for diff. It's available in Debian packages e.g. (you didn't tell your OS). –  ott-- Nov 24 '11 at 13:21

2 Answers 2

try :TOhtml, see also http://vim.wikia.com/wiki/Pasting_code_with_syntax_coloring_in_emails

share|improve this answer
    
It's actually :TOhtml. –  ggustafsson Nov 21 '11 at 9:49
    
@ggustafsson: fixed. –  akira Nov 21 '11 at 10:55

Just use

:TOhtml

(not :ToHTML as akira told you before).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.