Closed rpuntaie closed 6 years ago
What are you talking about?
I've noticed that .txt files do not get rst colored. In vim I have a .. vim: syntax=rst
in the first line of the file. This makes vim color properly. Maybe the same thing could be done with this package.
Since apart from .rst at least another extension (.rest) is considered restructuredText, I'm actually good. I will rename all my .txt files to .rest files. I need another extension for the included files in order for Sphinx to ignore them.
I have a
.. vim: syntax=rst
in the first line of the file. This makes vim color properly
Yes, that's a Vim modeline which tells Vim what language a file is written in. It therefore impacts the file's classification and syntax highlighting on GitHub. You can read more on that subject here.
Maybe the same thing could be done with this package.
I thought I did. :confused: Turns out I hadn't, which catches me by surprise. Will fix this.
(BTW, any particular reasons you're using txt
for these files? txt
is really meant for plain-old text.
You are right, .txt
should be just plain text. I have moved to .rest
and .rst
.
If in the first line of the current buffer there is ...* rst the text should be colored according rst, even if the extension is .txt.