LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux Mint (http://www.linuxquestions.org/questions/linux-mint-84/)
-   -   How to have colors in vim with Latex syntax? (http://www.linuxquestions.org/questions/linux-mint-84/how-to-have-colors-in-vim-with-latex-syntax-4175439687/)

xpucto 12-02-2012 09:18 AM

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

Thanks.

bigrigdriver 12-02-2012 11:03 AM

This thread may help: http://www.linuxquestions.org/questi...ckware-776958/

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.
Code:

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).

Markus

xpucto 12-02-2012 05:42 PM

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

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

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:

Quote:

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
Code:

whereis vim
Markus

xpucto 12-03-2012 02:57 AM

Quote:

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.

Markus

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.

Markus

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 12:59 AM.