LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices

Reply
 
Search this Thread
Old 12-02-2012, 09:18 AM   #1
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 522

Rep: Reputation: 31
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.

Last edited by xpucto; 12-02-2012 at 09:27 AM.
 
Old 12-02-2012, 11:03 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,771

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
This thread may help: http://www.linuxquestions.org/questi...ckware-776958/
 
Old 12-02-2012, 01:27 PM   #3
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
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
 
Old 12-02-2012, 05:42 PM   #4
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 522

Original Poster
Rep: Reputation: 31
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

Last edited by xpucto; 12-02-2012 at 05:45 PM.
 
Old 12-03-2012, 12:36 AM   #5
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
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
 
Old 12-03-2012, 02:57 AM   #6
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 522

Original Poster
Rep: Reputation: 31
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.
 
Old 12-03-2012, 03:01 AM   #7
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

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

Markus
 
1 members found this post helpful.
Old 12-03-2012, 06:04 AM   #8
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
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
 
1 members found this post helpful.
Old 12-03-2012, 02:09 PM   #9
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 522

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

Last edited by xpucto; 12-03-2012 at 02:17 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VIM syntax highlighting: Use of AWK syntax inside shell scripts kaiserkarl13 Programming 0 11-13-2012 10:04 AM
[SOLVED] What's the best way to get LaTeX syntax highlighting in vim on slackware? Allamgir Slackware 3 12-20-2009 11:23 AM
vim colors AndeAnderson Linux - Software 3 03-09-2007 06:41 AM
vim colors fw12 Linux - General 5 07-02-2006 11:49 PM
vim colors Erik Thorsson Debian 1 02-09-2005 09:38 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration