-   Linux Mint (
-   -   How to have colors in vim with Latex syntax? (

xpucto 12-02-2012 09:18 AM

How to have colors in vim with Latex syntax?
How may I configure vim so that it recognize the latex syntax and show colors (on Mint 13)?


bigrigdriver 12-02-2012 11:03 AM

This thread may help:

markush 12-02-2012 01:27 PM

The first thing is to check if you have already a .vimrc in your homedirectory. If not you should copy the example-vimrc /usr/share/vim/vim73/vimrc_example.vim to your homedirectory.

cp /usr/share/vim/vim73/vimrc_example.vim ~/.vimrc
Afterwards check if syntaxhighliting works, it is the default!

If not you can put the code from the other thread which was recommended above into your .vimrc

The files which manage syntaxhighliting and indentation are found in /usr/share/vim/vim73/syntax/ and /usr/share/vim/vim73/indent/ they are loaded automatically when vim recognizes the filetype (from the file-suffix, *.tex in your case).


xpucto 12-02-2012 05:42 PM

I did copy .vimrc in my homedirectory then added at the end of the file

set t_Co=256
syn on
Then I opend a tex file and got the following message:

E319: Sorry, the command is not available in this version: syn on
So I deleted "syn on" but nothing changed then. No color. Where am I supposed to put this "set t_Co=256" in the file? At the end?

By the way, in "/usr/share/vim/vim73/"
I only have these:


debian.vim doc

markush 12-03-2012 12:36 AM

Well, then it's a Debian related question. You should read the documentation. vim normally has LaTeX highlighting by default.

You can try the command

whereis vim

xpucto 12-03-2012 02:57 AM


whereis vim
vim: /usr/bin/vim.tiny /etc/vim /usr/bin/X11/vim.tiny /usr/share/vim /usr/share/man/man1/vim.1.gz
But I don't see how it helps me further... Maybe I should post the same thread in the Debian forum if you mean it's a Debian issue.

markush 12-03-2012 03:01 AM

Report your thread to the mods and ask them to move it there. Use the report button.


markush 12-03-2012 06:04 AM

BTW: I don't have experience with Debian but you should check in the repository if there are any additional packages for vim.

With Slackware we're quite pampered with the full installation of all packages, no need to fiddle the programs together.


xpucto 12-03-2012 02:09 PM

Thanks a lot! Only vi was actually installed. So I installed vim and another package and now the world is colorful again! Thank you.

All times are GMT -5. The time now is 01:59 PM.