Friday, March 26, 2010

Re: FIXME syntax highlighting.

On 27/01/10 05:37, Matt Wozniski wrote:
[...]
> In my experience, using<Esc> as the LHS of a map can have disastrous
> side effects in terminal vim, up to and including breaking most of the
> non-alphanumeric keys on the keyboard (including the arrow keys,
> delete, function keys, page keys, mouse selection, mousewheel
> scrolling, etc).[...]

This ought not to happen if 'ttimeoutlen' is set to a positive value
significantly smaller than 'timeoutlen' (which is not the default) while
'timeout' is set on (which is the default). I recommend the following:

- Set 'ttimeoutlen' (in milliseconds) to less than the time between
successive keystrokes at your fastest typing speed, but more than the
time between the successive bytes sent for a single key by the keyboard
driver.

- Set 'timeoutlen' (also in milliseconds) to long enough so that it will
wait while you decide what will be the next keypress in any multikey
{lhs}, but short enough not to tire your patience while you're waiting
for it to time out because you're not typing a multikey {lhs} (if you're
really impatient, something like <Left><Right> may resolve the ambiguity
and discard the mapping). (Example: You're on a US-QWERTY keyboard, and
German is your second language, so you've imapped sz to ß [the eszett or
"sharp s" character] -- but someday you have to type a Hungarian name
with sz in it. So either wait for a timeout after the s, or type
s<Left><Right>z.)

I use:

:set timeout timeoutlen=5000 ttimeoutlen=100

which means: time out after 0.1 second for the successive bytes of a
multibyte keycode, after 5 seconds for the successive keypresses of a
multikey mapping. YMMV.


Best regards,
Tony.
--
The longer I am out of office, the more infallible I appear to myself.
-- Henry Kissinger

--
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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

No comments: