I use Emacs with Vimpulse installed. When writing a lot by myself, I want to do it in Ctrl/Alt - Key. But when organizing text structure or work with other applications, I prefer Vim in Emacs.
The problem is that keys for same action in each are different, which is making a lot of wrong keystrokes before I notice. So, any advice to make Ctrl-Key as LowerCaseKey does for Vim, and Alt-Key as HigherCaseKey for Vim, in Emacs?
Or if this is hard, could I find changed Vimpulse to make keys as Emacs?
I'm not experienced with
viper-mode, but something like the following appears to work based on the limited testing I've done:You can add whatever other definitions you require to that hook to ensure that they're evaluated upon start-up. You'll need to be careful with your chosen key bindings, however.
C-y, for example, which you specifically mentioned, is normally bound toyank, and I suspect that's something you probably don't want to un-bind. Also,viper-modeappears to use a pretty complex and elaborate set of overlapping keymaps, so depending on what functionality you wish to enable, you may need to specify a different one (or, indeed, several different ones to be used in parallel), such asviper-vi-global-user-map,viper-insert-global-user-map, etc. Unfortunately, that's about the extent of my expertise w/r/tviper-mode.Edit: Sorry, I think I may have misunderstood your request. If you want to apply these key-bindings outside of
viper-mode, useglobal-set-key, i.e.:And so on. Again, be careful of the bindings that you set. Use
describe-key(bound by default toC-h k) to check what the key sequence you wish to remap is currently bound to.