Search code examples
emacsviperviper-mode

Rebinding C-c to C-c


I'm using Viper, and I want to change its C-c and C-g to the original emacs functions. I can rebind C-g with (define-key viper-vi-global-user-map "C-g" 'keyboard-quit), but how can I rebind C-c, since it's a prefix key?

Thanks!


Solution

  • It may make sense for you to run M-x viper-set-expert-level with an argument of 2 ("Master"). As the viper-mode documentation explains:

    2 -- MASTER: C-c now has its standard Emacs meaning in Vi command state, so most Emacs commands can be used when Viper is in Vi state.

    As you master viper-mode, you're meant to increase your expert-level setting gradually over time, making more Emacs features available to you (or, as the Viper documentation puts it, "To use Emacs productively, you must reach level 3 or higher").