On 10/07/10 21:21, Martin Trautmann wrote:
On 10-07-10 14:58, ZyX wrote:
Ответ на сообщение <<Re: map :%s/ to :%s/\v>>,
присланное в 15:12:24 10 июля 2010, Суббота,
отправитель Martin Trautmann:
noremap :%s/ :%s/\v
works as expected. Are you sure that you input :%s/ fast enough?
It does? I do not need the colon?
What do you mean by fast enough? I do not type this very fast since
these keys are spread and need some time to find (% is different on
various keyboard layouts).
Maybe defining S
command is better?
command -nargs=1 -range S execute "<line1>,<line2>s".<q-args>[0].'\v'.
\<q-args>[1:]
Hm, I may give this a try, but I wonder why the mapping does not work.
Thanks,
Martin
"fast enough" means with less than 'timeoutlen' milliseconds (default
1000) between keypresses.
You may want to change the timeout settings: I use
:set timeout timeoutlen=5000 ttimeoutlen=100
ttimeoutlen (in milliseconds) should be faster than your fastest typing
speed but slower than successive bytes sent for a single key by the
keyboard driver;
timeoutlen (also in milliseconds) should be slower than your slowest
typing speed but not too slow so that you can wait that long if you want
to "defeat" a mapping (and use the actual typed keys instead).
See
:help 'timeout'
:help 'timeoutlen'
:help 'ttimeout'
:help 'ttimeoutlen'
Best regards,
Tony.
--
Taxes are going up so fast, the government is likely to price itself
out of the market.
--
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