You are not logged in.

#1 2008-09-21 05:37:02

slimdog360
Member
Registered: 2007-04-28
Posts: 10

Vim-Latex (Im having trouble getting it to work)

Pretty sure that this is the right spot, if It's not can a mod move it to a place where it will get more attention.

Only recently started using Vim and it seems to be the foshizzle.

I installed texlive-most through extra, all went well. I installed Vim through the repos, all went well. Then I downloaded Vim latex from their site and think I installed it.It (see here) says all I have to do is untar the files in my .vim directory and add a few lines to my .vimrc file. Well I didn't have the .vim directory so I created it and put the files in there. I also didn't have a .vimrc file, so I created it and put what I had to (see here) in there.

keep in mind that Im still pretty new to Vim, ie I can edit files pretty well, but I don't have a clue how to change the colour scheme, or change filetypes. I've spent the past couple of days trying to figure out how to use vim-latex, going through documentation etc but I'm stuck.

Apart from what I wrote above and adding a .vim/colors/ directory to try and get a different colour scheme (didn't work) I haven't done anything else.

I can olny assume that to start a latex file is to type "vim filename.tex" into a console and then vim will automagically know to change the file type???? When I do that I get a heap of errors all saying pretty much the same thing

...
E117: Unknown function: IMAP
E117: Unknown function: IMAP
E117: Unknown function: IMAP
E117: Unknown function: IMAP
Error detected while processing function <SNR>15_Tex_SpecialMacros:
line   23:
E117: Unknown function: IMAP
Error detected while processing function <SNR>15_Tex_EnvMacros:
line   22:
E117: Unknown function: IMAP
Error detected while processing function <SNR>15_Tex_SpecialMacros:
...

It goes on, but it all says pretty much the same thing.

Then when that is finished vim starts me a blank file, and the latex syntax highlighting seems to work. Im guess there is something wrong here.

Anyway, I read here http://vim-latex.sourceforge.net/docume … iling.html that to comile the thing I type "\ll", if I do that I get the following errors

E121: Undefined variable: s:target
E15: Invalid expression: s:target
line   10:
E121: Undefined variable: s:target
E116: Invalid arguments for function Tex_Debug
line   12:
E121: Undefined variable: s:target
E116: Invalid arguments for function Tex_GetVarValue('Tex_FormatDependency_'.s:t
arget) != ''
E15: Invalid expression: Tex_GetVarValue('Tex_FormatDependency_'.s:target) != ''
...

Again this goes on but I know it must be something Im doing wrong.

Basically what Im asking is if someone has set this up before and can tell me a few of the basic things I need to get it working. Because at the moment I am completely lost.

also if anyone know what I have to do to change the colour scheme Id appreciate that too. I followed this here http://ajayfromiiit.wordpress.com/2006/ … im-editor/ but the colour dont change. Is there any tricks?
edit: okay, the changing of the colour scheem works when Im using gvim, but not when Im using a terminal. How can I/is it possible to change the terminal colours?

note: the latex bit still gives the same errors in gvim as it does when using a terminal.

Cheers

Last edited by slimdog360 (2008-09-21 06:00:52)

Offline

#2 2008-09-21 16:57:54

bender02
Member
From: Germany
Registered: 2007-02-04
Posts: 1,328

Re: Vim-Latex (Im having trouble getting it to work)

I've used to use vim-latex with older vims (like 6.2 or something), and I remember that it stopped cooperating with vim at some point. 7.0 is too new. But maybe they updated the macros. Anyway, this is just a warning that it might be that it's impossible to get it working without hard vim macro coding. (By the way, I love vim, but for tex editing I now use emacs/auctex.)

As far as colorschemes go, if they work with gvim but not with vim, it probably means that your terminal does not support all the colors the theme needs (gvim has (i believe) always 256 colors, but the terminals often have only 88 or some other number less than 256). Just try some colorschemes that come with vim (type :colo<tab><space> and now keep hitting <tab>, various colorschemes should appear).

Offline

#3 2008-09-21 17:08:33

bt
Member
Registered: 2007-04-11
Posts: 161

Re: Vim-Latex (Im having trouble getting it to work)

I have vim and gvim 7.1.330-1 and latex-suite 20060325-3.
I added:  let g:tex_flavor='latex'   to ~/.vimrc and it works perfectly. I have no idea what I did right!

Offline

#4 2008-09-21 18:53:16

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Vim-Latex (Im having trouble getting it to work)

I also have everything working just fine -- I followed the instruction on latex-suite site to the letter.

Offline

#5 2008-09-21 19:21:52

bender02
Member
From: Germany
Registered: 2007-02-04
Posts: 1,328

Re: Vim-Latex (Im having trouble getting it to work)

Eh, maybe I should give it a try again smile

Offline

#6 2008-09-22 09:14:09

slimdog360
Member
Registered: 2007-04-28
Posts: 10

Re: Vim-Latex (Im having trouble getting it to work)

hmm... I tried deleting all the files I created in my home directory and starting again (also reinstalled the texlive-most package). I don't have a clue what was wrong because it ended up being exactly the same - but - it did seemed to fix something because I'm not getting the errors anymore.

Im still having a bit of trouble getting it to compile but I think its more linking vim to texlive and finding the right command to compile the file. Any one know how to do this, or maybe a tutorial on how to do it?

Offline

#7 2009-06-11 17:53:06

dcurtis
Member
From: Iowa City, IA
Registered: 2008-10-13
Posts: 53

Re: Vim-Latex (Im having trouble getting it to work)

official /bump

I am having these same problems and I think it's because I'm using the AUR version.  In the AUR version they rename compilers/tex.vim to compilers/tex-latexsuite.vim  and this will cause the above errors.

However, if you install it locally, you don't have these problems because you essentially overwrite tex.vim in the official distribution.  I am posting a comment in the AUR PKGBUILD


CAW! Taskbar: AUR ;; forum ;; git

Offline

#8 2009-06-12 08:53:23

csslayer
Member
Registered: 2009-03-05
Posts: 84

Re: Vim-Latex (Im having trouble getting it to work)

Thanks for your replay.

I change the path for this package store, this time it require a little mod for vimrc like vim-latexsuite.
Hope this time everything will be right.

Offline

#9 2009-10-26 14:10:36

mindriot101
Member
Registered: 2008-01-22
Posts: 1

Re: Vim-Latex (Im having trouble getting it to work)

I *think* I managed to fix it by creating an autocmd rule to only load it on tex file loading:

au FileType tex so ~/.vim/ftplugin/tex_latexSuite.vim

At least it doesn't give me any errors now

Offline

Board footer

Powered by FluxBB