Closed blueyed closed 12 years ago
There is no strong convention to use txt
as RST. It can be Textile or something else as well.
If you want preview plugin to understand that all your txt
files are RST you can easy customize it by adding the next line to you .vimrc
file:
let g:PreviewRstExt .= ',txt'
You misunderstood me: you should not use the file extensions, but the file type (as setup in Vim).
So after :set filetype=rst
it would use :PreviewRst
.
Instead of mapping file extensions to commands, you would map file types (as in &filetype
).
Oh! I see. Your idea is great, thanks!
It's fixed with issue #24 by this commit: dd7bcfa
When trying to
:Preview
a foo.txt file (which has filetyperst
), it fails with: Preview: don't know how to handle .txt formatInstead, it should have used the filetype to branch out to calling
:PreviewRst
.