Export syntax-highlighted pdf files from vim
If you want to export from vim to a pdf file with syntax highlighting, hardcopy does not seem to use the correct syntax highlighting file. Or rather, it uses...
If you want to export from vim to a pdf file with syntax highlighting, hardcopy does not seem to use the correct syntax highlighting file. Or rather, it uses...
To make vim display italicised text, see this wonderful blog entry. Essentially, we need to manually map the escape sequences to the keywords sitm and ritm, ...
How do you automatically get vim to do PEP8-style indentation for python code? Look up this blog post which references this vim script. It has also been adde...
Note that in order for vim modelines to work, you must have the ‘modeline’ option set, i.e. :set modeline. Do a :help modeline for more info.
To insert characters with a certain ascii code in vim, use <C-v><code>. For example, <C-v>178 will print the squared symbol. I think only t...
To open binary files in a readable format, use vim -b. A more complex tool is xxd. Look at this link or man xxd for more info.
You can substitute the last search pattern in vim either by omitting the search pattern in the :%s command, or by inserting the contents of the search regist...
Export a vim file in whole or in part to postscript using :hardcopy >file.ps. Then use ps2pdf <file.ps> to convert to pdf.
Use g<C-g> to find the word count of a document. Also works in visual mode.
If vim does not detect a filetype correctly, then you can add a modeline at the top of the file (first or second line, I think), which tells vim the filetype...