On Sunday 22 November 2009 11:06:05 pm Chris Jones wrote:

> I have this in my .vimrc:
> 
> nmap <Space> i<Space><Esc>
> 
> It lets me enter spaces without leaving normal mode.
> 
> Or used to ..
> 
> Fairly recently, this stopped working as expected:
> 
> What happens if I hit space in normal mode, is that vim
>  inserts an unlimited number of spaces, apparently one at a
>  time.
> 
> I could be wrong about this, but it happens rather quickly and
>  I can't think of a way to have it played in slow motion.
> 
> What I see is this:
> 
> Say I have one line in my buffer with these characters:
> 
> abcdef
>    ^
> 
> The cursor is on the 'd'.
> 
> If I hit <Space>, the 'def' start moving rapidly to the right,
>  on to the next line, etc. until it disappears at the bottom
>  of the screen.
> 
> I have to hit Ctrl-C for this to stop.
> 
> I have verified via the 'ga' command that the characters that
>  are inserted are indeed spaces (0x20) not lookalikes.
> 
> The spaces are inserted at a rate of about 100 per second on
>  my machine and when this happens, Vim immediately starts
>  using all the CPU.
> 
> :map lists the mapping for <Space> exactly as it is in my
> : .vimrc.
> 
> Starting vim --no-plugin doesn't make any difference but vim
>  -u with a quasi-empty .vimrc does.
> 
> Any suggestions as to how I could have vim tell me what it is
>  actually doing when this happens?

make an almost null .vimrc, which you seem to have done, then 
gradually add stuff from your real .vimrc back to the one you are 
using, testing each time, til you see the weird behavior

space could be mapped other places, and  my first reaction was to 
say woah, you should be using nnoremap, but i don't presume to 
know what is going on with this

test with incrementally more relevant .vimrcs, is the best i can 
recommend

sc

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to