On 14/04/14 12:29, Dominic Humphries wrote:
Entering the commands to leave insert mode & insert a new line above the
current one, beginning with certain letters, results in punctuation on the current
line instead.
To reproduce:
Start vim, *quickly* type the keys: i<Esc>Om
Expected result:
New line created above the current one with the letter 'm' in it
Actual result:
Hyphen inserted on current line
Also affects:
Letters j,k,n,o
j gives *, k gives +, m gives -, n gives ., o gives /
Vim version: 7.4 (as installed by Ubuntu 13.10)
Happens on my machine, my co-worker's machine, several VMs and to some (not all) of the people I
asked about it on IRC. Definitely requires that the typing is done quickly. Causes me problems very
frequently because I write a lot of Perl and when I go to declare a variable, I get "-y
$foo" on the current line instead of "my $foo" on the previous line.
This sounds like a condition of badly configured timeouts. Try adding
the following line to your vimrc:
set timeout timeoutlen=5000 ttimeoutlen=100
where:
- timeouts are in milliseconds, you may vary them as follows:
- ttimeoutlen (here one-tenth of a second) is shorter than the time
between two keypresses at your fastest typing speed but longer than the
time between two successive bytes received as part of the keycode for a
single key.
- timeoutlen (here 5 seconds) is longer than the time between two
successive keypreses for the {lhs} of a mapping at your slowest typing
speed, but short enough to let you avoid using the mapping by waiting
longer than that without becoming impatient.
Then save your vimrc, close Vim and restart it. Do you still have the
problem after that?
Best regards,
Tony.
--
I have the simplest tastes. I am always satisfied with the best.
-- Oscar Wilde
--
--
You received this message from the "vim_dev" 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
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.