sjl / badwolf

A Vim color scheme.
http://stevelosh.com/projects/badwolf/
MIT License
1.25k stars 226 forks source link

LaTeX support added #7

Closed gglanzani closed 12 years ago

gglanzani commented 12 years ago

This should close issue 3.

I've finally got the time to understand how to add support for LaTeX.

Note: for how the LaTeX suite works in Vim, I had to add

call s:HL('Delimiter',   'tardis', '', 'none')

that is not strictly related to LaTeX but which I hope is not a problem.

Edit: here's the screenshots.

Before

Before

After

After

jbernard commented 12 years ago

Certainly off-topic, but the contents of this paper look really interesting, I'd love to read it once it's published.

gglanzani commented 12 years ago

Hi,

Thanks. The excerpt it's from the introduction to my PhD thesis. I can send you a copy (printer or electronic) after it's published if you want. You can drop me your address at @ .
sotte commented 12 years ago

I'm not a big fan of the color but I really like the idea. LaTeX really could use some love :)

sjl commented 12 years ago

Hmm, so the Delimiter change turns parens in Vimscript that color, which I don't like. Is there any way you could avoid setting that, or just do it for LaTeX files (maybe the LaTeX syntax highlighting puts a class on top of those?).

gglanzani commented 12 years ago

Ok, the last push should fix that. However I had to manually add

au BufRead,BufNewFile *.tex syn region texMathZoneV start="\\(" end="\\)\|%stopzone\>" keepend contains=@texMathZoneGroup
au BufRead,BufNewFile *.tex syn region texMathZoneX start="\$" skip="\\\\\|\\\$"    end="\$\|%stopzone\>" keepend contains=@texMathZoneGroup

to my .vimrc because somehow it was not read from my tex.vim.

sjl commented 12 years ago

Looks good, thanks!

I also added those two autocommands to the color file itself in an augroup, so you can remove them from your .vimrc.

gglanzani commented 12 years ago

Thanks, that was a bit of information missing to have even better. There are many more of this texMathZoneN and similar which could be supported this way. I'll work my way through it and make a new pull request.