it is strange. I have checked what tony suggested and posted
the results. but I don't know why the post doesn't appear in
this thread. Here I will repost the results again.
1) I am running konsole.
2) the term is set to be xterm.
3) In Insert mode, when you hit Ctrl-V followed by <Up>,
the "OA" are inserted.
4) In Normal mode, the answer to
:verbose set <Up>? <xUp>?
is:
t_ku <Up> ^[O*A
<xUp> ^[[1;*A
I think Tim is right because in the shell after I run "cat",
and hit <Up> key, I got ^[[A. I think vim got ^[OA from
the <Up> key. How can I fix the problem? thank you.
On 4月7日, 下午7时21分, Tony Mechelynck <[email protected]>
wrote:
> On 07/04/11 17:04, wxuyec wrote:
>
> > while it works for gvim and the command mode.
> > after I press /, when I want to use Up key to
> > go through the searching history, I get a character
> > A inserted.
>
> > Thanks in advance.
>
> Sounds like termcap discrepancy in Console mode:
> 1) What terminal are you running in? (cmd.exe, Terminal.app, xterm,
> konsole, gnome-terminal, mlterm, ...)
> 2) What is 'term' set to?
> 3) In Insert mode, when you hit Ctrl-V (or Ctrl-Q if you use Ctrl-V to
> paste) followed by <Up>, what is inserted?
> 4) In Normal mode, what is the answer to
>
> :verbose set <Up>? <xUp>?
>
> If neither of the replies at step 4 corresponds to what you see at step
> 3, you have a problem.
>
> Another possibility is that the first byte at step 3 is Ctrl-[ aka <Esc>
> and that Vim confuses it with a true Escape. In that case, try something
> like
>
> :set timeout timeoutlen=4000 ttimeoutlen=200
>
> where:
> * both values are in milliseconds
> * 'timeoutlen' should be longer than the time between successive
> keypresses when you're typing the {lhs} of a multibyte mapping at your
> slowest typing speed, but not so long as to make you impatient when
> you're waiting for Vim to notice that you don't want to trigger a mapping
> * 'ttimeoutlen' should be shorter than the time between successive
> keypresses at your fastest typing speed but longer than the time between
> successive bytes sent by the keyboard driver for a single (special-key)
> keypress.
>
> (Of course, if you're typing faster than the keyboard driver, you should
> calm down. ;-) )
>
> see
> :help termcap-options
> (read the introductory section, then
> scroll down to KEY CODES)
> :help 'timeout'
> :help 'timeoutlen'
>
> Best regards,
> Tony.
> --
> As of next week, passwords will be entered in Morse code.
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php