Dump vim screen into a file

Posted by user18151 on Super User See other posts from Super User or by user18151
Published on 2011-11-21T06:23:40Z Indexed on 2011/11/21 9:57 UTC
Read the original article Hit count: 174

Filed under:

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).

© Super User or respective owner

Related posts about vim