Thread: [Vim-latex-devel] newbie question
Brought to you by:
srinathava,
tmaas
From: Alexandre R. <fre...@gm...> - 2007-03-20 14:46:10
|
Hi, I've just got into the vim-latex world and I'm having some problems. * The first one is that my .tex files are not detected as latex files (only .latex files are). How can I make vim understand that the .tex files are in fact latex files? * Often I need to type =E3 and my keyboard is configured so that whenever I type ~a I get =E3. However, vim-latex seems to bind ~a to \cite{}. I've created the file .vim/after/ftplugin/tex.vim with the following line: call IMAP('~a', '=E3', 'tex') but it did not work at all. By the way, I'm using vim 7.0 on linux (ubuntu edgy) and vim-latex latexSuite20060325.tar.gz<http://vim-latex.sourceforge.net/downlo= ad/latexSuite20060325.tar.gz> Any help would be appreciated. Alexandre |
From: Vaidotas Z. <ze...@gm...> - 2007-03-20 15:55:55
|
Hi, On 3/20/07, Alexandre Rosas <fre...@gm...> wrote: > Hi, > I've just got into the vim-latex world and I'm having some problems. > * The first one is that my .tex files are not detected as latex files (on= ly > .latex files are). How can I make vim understand > that the .tex files are in fact latex files? > Hm, for me it works with vim 7.0, but I have older vim-latex version. It should be related to filetype selection in vim. Unfortunately I do not know enough to help you here. > * Often I need to type =E3 and my keyboard is configured so that whenever= I > type ~a I get =E3. However, vim-latex seems to bind > ~a to \cite{}. I've created the file .vim/after/ftplugin/tex.vim with > the following line: > call IMAP('~a', '=E3', 'tex') > but it did not work at all. > > By the way, I'm using vim 7.0 on linux (ubuntu edgy) and > vim-latex latexSuite20060325.tar.gz > > It is actualy a problem of vim, not vim-latex. For vim alt-c and =E3 is the same. When you press alt-c you get =E3, and when you press =E3 vim generates alt-c. Since vim-latex uses mapping alt-c, you have the problem. I searched a bit, but found nothing how to turn of this behaviour. You can solve this problem in following ways: 1. Turn off vim-latex mapping alt-c. You have to have line TexLet g:Tex_AdvancedMath=3D0 in your texrc file. There is an explanation there, what else you will lose by setting this option 2. Enter =E3, like diacritic, by pressing ctrl-k, then a, then ?. 3. Manually change alt-c mapping (actualy m-c) in brackets.vim to some other mapping you like. 4. Find how to turn off this unwanted vim behaviour, and share it with me:) Vaidotas |
From: Alexandre R. <fre...@gm...> - 2007-03-20 17:43:20
|
Thanks, Vaidotas. Your tip about the filetype helped me to find out a solution. The problem was the default type for .tex file was plain tex and no latex. I managed to change this with the following line in my .vimrc let g:tex_flavor =3D "latex" I also solved the second problem (using your first method), however I still have a problem with "=E9". When I type 'e (in the insert mode) the cursor just move back one character if it is at the end of the line. Do you know how to get =E9? Thanks, Alexandre On 3/20/07, Vaidotas Zemlys <ze...@gm...> wrote: > > Hi, > > On 3/20/07, Alexandre Rosas <fre...@gm...> wrote: > > Hi, > > I've just got into the vim-latex world and I'm having some problems. > > * The first one is that my .tex files are not detected as latex files > (only > > .latex files are). How can I make vim understand > > that the .tex files are in fact latex files? > > > Hm, for me it works with vim 7.0, but I have older vim-latex version. > It should be related to filetype selection in vim. Unfortunately I do > not know enough to help you here. > > > * Often I need to type =E3 and my keyboard is configured so that whenev= er > I > > type ~a I get =E3. However, vim-latex seems to bind > > ~a to \cite{}. I've created the file .vim/after/ftplugin/tex.vim with > > the following line: > > call IMAP('~a', '=E3', 'tex') > > but it did not work at all. > > > > By the way, I'm using vim 7.0 on linux (ubuntu edgy) and > > vim-latex latexSuite20060325.tar.gz > > > > > It is actualy a problem of vim, not vim-latex. For vim alt-c and =E3 is > the same. When you press alt-c you get =E3, and when you press =E3 vim > generates alt-c. Since vim-latex uses mapping alt-c, you have the > problem. I searched a bit, but found nothing how to turn of this > behaviour. You can solve this problem in following ways: > > 1. Turn off vim-latex mapping alt-c. You have to have line > TexLet g:Tex_AdvancedMath=3D0 > > in your texrc file. There is an explanation there, what else you will > lose by setting this option > > 2. Enter =E3, like diacritic, by pressing ctrl-k, then a, then ?. > > 3. Manually change alt-c mapping (actualy m-c) in brackets.vim to some > other mapping you like. > > 4. Find how to turn off this unwanted vim behaviour, and share it with > me:) > > Vaidotas > |
From: Vaidotas Z. <ze...@gm...> - 2007-03-20 18:18:18
|
Hi, On 3/20/07, Alexandre Rosas <fre...@gm...> wrote: > Thanks, Vaidotas. Your tip about the filetype helped me to > find out a solution. The problem was the default type for > .tex file was plain tex and no latex. I managed to change this > with the following line in my .vimrc > let g:tex_flavor =3D "latex" > > I also solved the second problem (using your first method), > however I still have a problem with "=E9". When I type > 'e (in the insert mode) the cursor just move back one > character if it is at the end of the line. Do you know how > to get =E9? > =E9 in vim is mapped to Alt-i. This is also vim-latex keymap for inserting \item. I found that besides brackets.vim it is also used in envmacros.vim. So if you already have TexLet g:Tex_AdvancedMath=3D0 go to envmacros.vim file search for M-i, and either comment the lines where this mapping is being used or change it to something else. I am beginning to see a big problem. You cannot use some of the meta mappings with vim, if you use certain accented letters a lot. And I did not find any documentation about this feature. If you have further problems with accented letters, try opening empty vim window, type all the letters while holding alt, find which mapping corresponds to accented letter and then search this mapping in vim-latex code. Highly annoying! Vaidotas |
From: Vaidotas Z. <ze...@gm...> - 2007-03-20 18:30:10
|
On 3/20/07, Alexandre Rosas <fre...@gm...> wrote: > Thanks, Vaidotas. Your tip about the filetype helped me to > find out a solution. The problem was the default type for > .tex file was plain tex and no latex. I managed to change this > with the following line in my .vimrc > let g:tex_flavor =3D "latex" > > I also solved the second problem (using your first method), > however I still have a problem with "=E9". When I type > 'e (in the insert mode) the cursor just move back one > character if it is at the end of the line. Do you know how > to get =E9? > Actualy this was discussed in this list in December 2006. Search the archiv= es. Vaidotas |