13

evil, the Extensible VI Layer for Emacs Questionable name aside, evil is the current state-of-the art when it comes to vim emulation in Emacs (and possibly anywhere else, for that matter). It supports a lot of features that other Vim emulation packages eschew, including: vim textobjects vim registers vim keyboard macros ex commands Advantages Key ...


10

There is god-mode (https://github.com/chrisdone/god-mode), which uses standard Emacs key bindings but removes the need to hold down modifiers. When god-mode is enable C-... bindings require no modifier and M-... bindings use a prefix rather than a modifier. As an example from the github page: Before: C-p C-k C-n M-^ ) C-j C-y M-r C-x z z M-2 M-g M-g C-x ...


9

fset sets a symbol's function definition. Here, projectile-command-map is used as a prefix command. A prefix command is a symbol whose function definition is a keymap. The definition of a prefix key is usually the keymap to use for looking up the following event. The definition can also be a Lisp symbol whose function definition is the following keymap; ...


6

Interestingly, you can try binding the deletechar pseudo key. When I check the binding of backspace on my machine with C-h k [backspace], I get: DEL (translated from <backspace>) runs the command... (blah blah blah) When I check the binding of shift + backspace on my machine with C-h k S-[backspace], I get: <deletechar> (translated from &...


6

I found a solution: (global-unset-key (kbd "C-x p-")) I can't find documentation of this anywhere, so I"m not sure if it works by coincidence or by design. However, the reproducible effect is that it disables the keymap and allows me to redefine "C-x p".


6

Modalka must be the newest kid on the modal editing block. The github project seems to be all of 10 days old. I don't have enough usage time to comment or evaluate, but here's how it is described: This is a building kit to help switch to modal editing in Emacs. Main goal of the package is making modal editing in Emacs as natural and native as possible. ...


5

Adding my own, thanks @Mark for encouragement. Xah Fly Keys Designed from the ground up for emacs, with the goal of being the MOST efficient system, from years experience with ergoemacs-mode. Key choices are science based as much as possible, based on statistics of key frequency and key easy-to-press score. Most frequently used commands are mapped to the ...


4

I found a solution—the following works for me: Control Panel > Language > Advanced Settings > Change language bar hot keys > Ensure Between input languages is highlighted > Change Key Sequence... > Change Switch Keyboard Layout from Ctrl + Shift to Not Assigned. A similar process is outlined here.


4

There's nothing new or unusual about this. This is how prefix keys work. They are bound to a keymap -- or they are bound to a symbol whose value or whose function definition is a keymap. The Elisp manual node Prefix Keys tells you this: The keymap binding of a prefix key is used for looking up the event that follows the prefix key. (It may instead be ...


4

In most cases, you can type the prefix and then C-h to get a list of all the bindings that begin with that prefix. This won't directly tell you what the prefix means and not all prefixes have a specific generic purpose. But, you may be able to tell from the set of functions what the commonality is. The reason it's "in most cases" is that if the prefix ...


4

One way to move -mode's keybindings could be with something like (let ((origmap <foo>-mode-map) (newmap (make-sparse-keymap))) (define-key newmap <prefix> origmap) (setq <foo>-mode-map newmap)) But this code will fail if run before foo-mode is run. And it will have no effect if run after the mode is entered. So you'll ...


4

It depends on the minor-mode/package. Many make this more configurable, which doesn't seem to be true in this case. I think the simplest thing here would be to just redefine the keymap yourself instead of trying to fiddle with it. Try this (setq hs-minor-mode-map (let ((map (make-sparse-keymap))) ;; These bindings roughly imitate those used ...


4

The short answer: If you wish the prefix to be present in all buffers and all modes, use global-set-key. If you wish it to be present only in one mode, use local-set-key. The difference between the two is what keymap they put the binding into: The global one, or the local one. When you type a key sequence, the local map is searched first, then the global ...


3

You can't. There's no way for a terminal to communicate both control and shift modifiers. The very original terminals (teletypes, actually) implemented the control modifier by masking out the top two bits of the 7-bit character set, allowing for 32 control codes. A Q is character number 0x51, and q is 0x71. The bottom five bits of these are both the same (...


3

Boon Boon is one of less-known packages for modal editing. It doesn't emulate Vi (or Vim) but provides original layout optimized for Colemak keyboard layout. Advantages and Design Principles Spacial allocation first, mnemonics second: the allocation of keys to commands is based in priority on the locations of keys on the keyboard. Whatever is printed on ...


3

Ergoemacs also supports modal editing. It doesn't emulate vi, but uses Alt key for most frequently used commands. For example, moving cursor is Alt plus right hand inverted T. (On QWERTY it is Alt+j for left, Alt+l for right, Alt+i for up and Alt+k for down). Deleting char or word is Alt with left hand home-row keys. Key choices are based on command ...


3

This sounds like exactly what the which-key package does. When you type a prefix key, after a short pause, a list of keys in the keymap and the commands they are bound to is shown in a side window. It's great for things you don't quit do often enough to have memorized. Install it with package-install which-key and activate it with (which-key-mode).


2

Another semi-modal option is Hydra: https://github.com/abo-abo/hydra According to the website Imagine that you have bound C-c j and C-c k in your config. You want to call C-c j and C-c k in some (arbitrary) sequence. Hydra allows you to: Bind your functions in a way that pressing C-c jjkk3j5k is equivalent to pressing C-c j C-c j C-c k C-c k M-3 C-c j M-...


2

The problem in your attempt is that apps comes from a translation via key-translation-map, and this output is not searched in key-translation-map recursively. If you omit apps altogether and work with f19 directly, it works. (global-set-key (kbd "<f19> s") 'save-buffer) (define-key key-translation-map (kbd "<f19> d") (kbd "C-c")) If you want to ...


2

From gnu.org: M-x local-unset-key <RET> key Make key undefined locally (in the major mode now in effect). So you can use (local-unset-key (kbd "C-x p-"))


2

The problem is that by changing the value of ensime-mode-key-prefix you are doing just that and nothing else. Somewhere after the definition of this option there is code which uses the value. If you haven't changed it then the default value is used, else the value you picked. But if you change the value after the library has already been loaded, then that ...


2

I have this in my setup: (define-key global-map [(shift backspace)] 'backward-delete-whitespace) (define-key global-map [(shift delete)] 'forward-delete-whitespace) to make shift+backspace / shift+delete kill all whitespace. And just in case someone would need these functions, here they are: (defun backward-delete-whitespace () (interactive) (let ((p ...


2

Define a prefix key for the mode's keymap. Undefine the other keys that bother you, from that keymap. Suppose that mode foo-mode binds key C-x o to foo-it, and you don't like that. (define-key foo-mode-map (kbd "C-x o") nil) And suppose you want foo-mode-map on prefix key <f9>: (define-prefix-command 'foo-mode-map) (define-key global-map (kbd "<...


2

One way to do it is, instead of binding C-c z to a prefix key, bind it to a command that displays what you want and then calls set-transient-map to read a key sequence and interpret it in another map. Any key that isn't bound in the other map will be interpreted in the global map, so rather than wg-prefixed-map, you should provide a keymap where unknown ...


2

The first answer is that its purpose is to act as a prefix key to the keys that follow it; that is, to serve as a keymap for a certain number of key bindings. Those bindings are also shown in describe-key. Seriously; this is the purpose: to group those keys and their commands. Now what that grouping might be about is another question (see next). Beyond #1, ...


2

By default, evil binds C-w to the evil-window-map, within which it stores the rest of the keybindings. In looking at the source code, the core spot it happens is in evil-motion-state-map. Depending on how you set evil-want-C-w-delete and evil-want-C-w-in-emacs-state, it will also bind the key in evil-insert-state-map and evil-emacs-state-map as well. You ...


2

It looks like the answer is yes, you are right. And there is no cleaner way to deal with it - but see below, for one suggestion. I'd suggest filing an enhancement request that Emacs add a variable for this keymap: M-x report-emacs-bug. You can of course define your own map variable for this, basing its value on the current ibuffer.el code. But that won't ...


2

This binding is in the global keymap. Generally key bindings that work in most or all buffers are in the global keymap. If in doubt, see How can I find out in which keymap a key is bound? to check. So you can simply call (global-set-key (kbd "<ESC> <ESC>") 'keyboard-escape-quit) This overrides the previous binding of ESC ESC as a prefix. Note ...


2

There are settings for the leader key in your .spacemacs file. I have remapped mine to Page Up, (which is represented as <prior> by emacs). Here's what I have in my .spacemacs: ;; The leader key dotspacemacs-leader-key "<prior>" ;; The key used for Emacs commands (M-x) (after pressing on the leader key). ;; (default "SPC") dotspacemacs-emacs-...


2

You didn't show us how you're attempting to bind S-RET, but one way is: (local-set-key (kbd "S-<return>") (lambda () (interactive) (message "hello")))


Only top voted, non community-wiki answers of a minimum length are eligible