DervishD wrote:
Hi all :))I'm not exactly new to this list, I was subscribed back in 2002, when I tried to migrate from Joe to Vim. I finally didn't do it for some reasons, and I finally forgot about it. The fact is that I've decided to go Vim once and for all, because Joe is giving me some problems in its latest versions. I've already made a vimrc file (only "set" commands by now), and now the turn is for keybindings ;) My main problem is that *my* keybindings for joe are deep in my muscle memory (so to say) and I keep hitting them for things like saving, going to the next open file, etc. This is not a big deal, because I can remap those key combos, or learn the new ones. The problem is that I'm pretty sure that sooner or later I'm going to hit a vim key combination that will wreak havoc. I simply don't want to go through the hundred keys in vim just to avoid hitting them accidentally, so I have a question: is there any equivalent to ":mapclear" for builtin keys? I suppose not, because in vim that builtin keys are really the editing commands :( So, is there a way of disabling all default keys and use only those keys specified using "map"? 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>+ Sorry if I haven't made it clear O:)))) and thanks in advance. Raúl Núñez de Arenas Coronado
- 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.
- You may want to use ":noremap" rather than ":map". See ":help map.txt" for details.
- BUT, I don't think you can map Ctrl-K. It is used for digraphs (see ":help digraphs") and (IIUC) cannot be mapped to anything else. As for Ctrl-+, that's not a "standard" control-key: I don't think Vim (which uses "cooked" keyboard input) would be able to recognise it reliably.
I recommend that you learn the "vim" key bindings. (Until you learn them, you can use arrow keys, which are presumably portable; menus; and ex-commands.)
Best regards, Tony.
