Hi Benji :)

 * Benji Fisher <[EMAIL PROTECTED]> dixit:
> On Wed, Nov 22, 2006 at 02:04:29PM +0100, A.J.Mechelynck wrote:
> > DervishD wrote:
> [snip]
> > >    I want to do something like that in my vimrc.
> > >
> > >    delete_all_keys "if at all possible
> > >    map i i         "yes, I want to go to insert mode
> > >    ...
> > >    ...
> > >    map <C-k>x w    "Weird, but just an example
> > >
> > >    So, if I don't have map'ed <C-w>+ and I hit it, the window size
> > >won't change, but I still will be able to do this:
> > >
> > >    map <C-+> <C-w>+
> > 
> > - There is no simple command to unbind all keys. You can have one 
> > particular key have no effect by mapping it to <Nop> -- but beware of the 
> > risk of breaking the ":normal" command in scripts.
> 
>      I agree that this is not necessarily a good idea, but there
> are a few ways to map keys to <Nop> "in bulk."
> 
> let letter = "a"
>   while letter <= "z"
>   execute "map" letter "<Nop>"
>   let letter = nr2char(char2nr(letter) + 1)
> endwhile
> 
> " Vim 7.0 only
> for char in split("@!&#$%", '.\zs')
>   execute "map" char "<Nop>"
> endfor
> 
> " Vim 7.0 only
> for word in ['<C-W>', '<C-X>', '<C-A>']
>   execute "map" word "<Nop>"
> endfor

    Thanks a lot :) This is what we was looking for, except, as you
say, this is not a good idea unless I don't use any script (or
plugin, etc.) which uses ":normal" :(
 
>      A better solution might be to stay out of Normal mode.
> 
> :set insertmode
> :help 'insertmode'
> :help evim-keys

    That's another idea I had: set permanent Insert mode and bind the
keys I'm used to type, together with a couple of keybindings for
setting "noinsertmode" if I need to.

    The naked truth is that I should learn the vim keybindings, but
it is going to be pretty hard...

    Thanks a lot for your answer, you've been very helpful :))

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

Reply via email to