Thread: [Vim-latex-devel] Latex-suite keyboard mappings not working
Brought to you by:
srinathava,
tmaas
From: Xavier D. <xav...@gm...> - 2010-06-09 13:25:13
|
Hello, and sorry if this has been asked a hundred times, but I can't seem to find the answer. I'm using vim 7.2 on FreeBSD 8.0 and vim-latex suite, and some keymappings are definitely not working when I use "normal" vim, while they do work in gvim. Up to now, I've at least encountered the problem with F9, which capitalises the first letter of the line instead of launching TeX_Completion, and /rf, which does nothing at all. Any hint on what might be the problem or how to work it around ? TIA -- Xavier |
From: Gary J. <gar...@sp...> - 2010-06-09 14:55:41
|
On 2010-06-09, Xavier Dectot wrote: > Hello, and sorry if this has been asked a hundred times, but I can't > seem to find the answer. I'm using vim 7.2 on FreeBSD 8.0 and > vim-latex suite, and some keymappings are definitely not working when > I use "normal" vim, while they do work in gvim. Up to now, I've at > least encountered the problem with F9, which capitalises the first > letter of the line instead of launching TeX_Completion, and /rf, which > does nothing at all. Any hint on what might be the problem or how to > work it around ? When operating in a terminal, vim uses the termcap or terminfo database and an internal database to determine the sequence of characters that the terminal sends when you type certain keys such as F9. The terminal I'm using now, which emulates an xterm, emits <Esc>[20~ when I type F9. I determined that by entering insert mode, typing Ctrl-V, then hitting F9. If vim doesn't know that that sequence means F9, it will execute the sequence as a series of key strokes. <Esc> is a no-op in normal mode. [ is the first character of a number of "left bracket" commands. 2 There is no [2 command, so vim ignores both the [ and the 2. 0 moves the cursor to the beginning of the row. ~ toggles the case of the character under the cursor. So it appears that your vim is using an incomplete or incorrect database for your terminal. This is usually because the value of TERM in your environment is incorrect or because your system's terminfo database does not have an entry for your TERM. You can see what kind of terminal vim thinks you're using by executing :set term? Does that match what you're really using? Regards, Gary |
From: Xavier D. <xav...@gm...> - 2010-06-09 17:03:48
|
Le 09/Jun - 07:55, Gary Johnson a écrit > On 2010-06-09, Xavier Dectot wrote: > > Hello, and sorry if this has been asked a hundred times, but I can't > > seem to find the answer. I'm using vim 7.2 on FreeBSD 8.0 and > > vim-latex suite, and some keymappings are definitely not working when > > I use "normal" vim, while they do work in gvim. Up to now, I've at > > least encountered the problem with F9, which capitalises the first > > letter of the line instead of launching TeX_Completion, and /rf, which > > does nothing at all. Any hint on what might be the problem or how to > > work it around ? > > When operating in a terminal, vim uses the termcap or terminfo > database and an internal database to determine the sequence of > characters that the terminal sends when you type certain keys such > as F9. The terminal I'm using now, which emulates an xterm, emits > > <Esc>[20~ > > when I type F9. I determined that by entering insert mode, typing > Ctrl-V, then hitting F9. If vim doesn't know that that > sequence means F9, it will execute the sequence as a series of > key strokes. > > <Esc> is a no-op in normal mode. > [ is the first character of a number of "left bracket" > commands. > 2 There is no [2 command, so vim ignores both the [ and > the 2. > 0 moves the cursor to the beginning of the row. > ~ toggles the case of the character under the cursor. > > So it appears that your vim is using an incomplete or incorrect > database for your terminal. This is usually because the value of > TERM in your environment is incorrect or because your system's > terminfo database does not have an entry for your TERM. > > You can see what kind of terminal vim thinks you're using by > executing > > :set term? > > Does that match what you're really using? Well, yes and no. In urxvt, I :set term returns xterm, so something is wrong here, but in screen, which is where I am indeed typing, :set term returns screen, which is correct. Anyhow, in urxvt as in screen as in xterm, Ctrl-V F9 returns ^[[20~, so this should not be the problem. I even tried :set termcap tk_9=^[[20~ with no better result. :( -- Xavier |
From: Xavier D. <xav...@gm...> - 2010-06-09 18:51:42
|
Le 09/Jun - 18:56, Xavier Dectot a écrit > Le 09/Jun - 07:55, Gary Johnson a écrit > > On 2010-06-09, Xavier Dectot wrote: > > > Hello, and sorry if this has been asked a hundred times, but I can't > > > seem to find the answer. I'm using vim 7.2 on FreeBSD 8.0 and > > > vim-latex suite, and some keymappings are definitely not working when > > > I use "normal" vim, while they do work in gvim. Up to now, I've at > > > least encountered the problem with F9, which capitalises the first > > > letter of the line instead of launching TeX_Completion, and /rf, which > > > does nothing at all. Any hint on what might be the problem or how to > > > work it around ? > > > > When operating in a terminal, vim uses the termcap or terminfo > > database and an internal database to determine the sequence of > > characters that the terminal sends when you type certain keys such > > as F9. The terminal I'm using now, which emulates an xterm, emits > > > > <Esc>[20~ > > > > when I type F9. I determined that by entering insert mode, typing > > Ctrl-V, then hitting F9. If vim doesn't know that that > > sequence means F9, it will execute the sequence as a series of > > key strokes. > > > > <Esc> is a no-op in normal mode. > > [ is the first character of a number of "left bracket" > > commands. > > 2 There is no [2 command, so vim ignores both the [ and > > the 2. > > 0 moves the cursor to the beginning of the row. > > ~ toggles the case of the character under the cursor. > > > > So it appears that your vim is using an incomplete or incorrect > > database for your terminal. This is usually because the value of > > TERM in your environment is incorrect or because your system's > > terminfo database does not have an entry for your TERM. > > > > You can see what kind of terminal vim thinks you're using by > > executing > > > > :set term? > > > > Does that match what you're really using? > > Well, yes and no. In urxvt, I :set term returns xterm, so something is wrong > here, but in screen, which is where I am indeed typing, :set term returns > screen, which is correct. Anyhow, in urxvt as in screen as in xterm, Ctrl-V F9 > returns ^[[20~, so this should not be the problem. I even tried :set termcap > tk_9=^[[20~ with no better result. > :( Oh, and FWIW, I tried export TERM=rxvt-unicode vim and got the same results… Thanks for your help, BTW -- Xavier |
From: Gary J. <gar...@sp...> - 2010-06-09 22:03:43
|
On 2010-06-09, Xavier Dectot wrote: > Le 09/Jun - 18:56, Xavier Dectot a écrit > > Le 09/Jun - 07:55, Gary Johnson a écrit > > > On 2010-06-09, Xavier Dectot wrote: > > > > Hello, and sorry if this has been asked a hundred times, but I can't > > > > seem to find the answer. I'm using vim 7.2 on FreeBSD 8.0 and > > > > vim-latex suite, and some keymappings are definitely not working when > > > > I use "normal" vim, while they do work in gvim. Up to now, I've at > > > > least encountered the problem with F9, which capitalises the first > > > > letter of the line instead of launching TeX_Completion, and /rf, which > > > > does nothing at all. Any hint on what might be the problem or how to > > > > work it around ? > > > You can see what kind of terminal vim thinks you're using by > > > executing > > > > > > :set term? > > > > > > Does that match what you're really using? > > > > Well, yes and no. In urxvt, I :set term returns xterm, so something is wrong > > here, but in screen, which is where I am indeed typing, :set term returns > > screen, which is correct. Anyhow, in urxvt as in screen as in xterm, Ctrl-V F9 > > returns ^[[20~, so this should not be the problem. I even tried :set termcap > > tk_9=^[[20~ with no better result. > > :( > Oh, and FWIW, I tried > export TERM=rxvt-unicode > vim > and got the same results... First of all, to set the escape sequence for F9, the command is :set t_k9=^[[20~ where ^[ is a literal escape. You wrote that you set tk_9, which won't work. What does :set termcap show for the "t_k9 <F9>" entry? I have tried three configurations: 1. Cygwin rxvt running a Cygwin vim on Windows XP; 2. Cygwin rxvt running screen, then a Cygwin vim, again on Windows XP; and 3. Cygwin mintty on a different Windows XP box running rlogin across a VPN to a box running RHEL4, and on that box running screen and vim. In all cases, ":set termcap" shows an escape sequence defined for t_k9. Both rxvt and mintty cause 'term' to be "xterm" and screen causes 'term' to be "screen". I don't think I've done anything special to make that all work, so I think we should be able to find some simple fix for your environment. > Thanks for your help, BTW You're welcome. I'm sorry it hasn't done any good so far. Regards, Gary |