All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
13 views

Keybindigs conflict between minor modes

The configuration that I have for python mode implies loading both elpy.el and python.el. The things is that I found the python.el keybindings more natural than the elpy.el ones. And most of the ...
4
votes
1answer
81 views

How to suppress a minor mode's key binding in only certain major modes?

Suppose that I use minor mode MIN with a whole bunch of major modes. In one of those major modes, call it MAJ1, MIN's binding for a specific key K is undesirable; I would therefore like to suppress ...
1
vote
1answer
257 views

Bindings for source code when debugging in gdb/gud

We can define a bunch of bindings for gud-mode through gud-mode-map. But it seems these bindings only hold when the active window is one of the dedicated gdb windows (or simply the comint window if ...
2
votes
2answers
105 views

Keybinding in Julia minor mode

I am unable to change keybinding in a minor mode. Initiaton of minor mode: (add-hook 'julia-mode-hook 'julia-repl-mode) I tried a view variatons for the keybinding: (add-hook 'julia-repl-mode ...
2
votes
1answer
501 views

Proper way to change prefix key for minor-mode map?

The package HideShow (hs-minor-mode) defines some key bindings with prefix key C-c @. What is the proper way to change this prefix key to C-c h? The new key binding should also replace the old key ...
2
votes
2answers
99 views

Disable minor mode when keys not in it's keymap are pressed

I was using this to implement line duplication in emacs and decided to bind it to C-c d and it works without problems What would be cooler though is if I can use C-c d do duplicate a line and then be ...
1
vote
1answer
184 views

Toggle minor mode with a custom keybinding

I'd like to be able to toggle M-x font-lock-mode with a custom keybinding like C-c l for example (or any minor mode for that matter). Can this be done relatively easily?
0
votes
1answer
124 views

How do I change a globalized minor mode's key bindings?

I'm using drag-stuff, which defines a minor-mode (drag-stuff-mode), a corresponding keymap (drag-stuff-mode-map), and a globalized minor mode (drag-stuff-global-mode). I want to make some changes to ...
3
votes
1answer
118 views

How can I 'layer' a keybinding?

I'm trying to create an emmet-like minor mode that will trigger on SPC (or TAB) if the previous text is expandable, but I don't want to completely override bindings that already exist for the key. ...
8
votes
1answer
551 views

Is there a 'caps-lock-mode' for those of us who've rebound the key?

Rebinding your caps-lock key to control is a popular thing to do (though there are arguments against it, even if a bit pedantic). However, the language I find a lot of my time in uses runs of ...
6
votes
3answers
822 views

How to make electric-pair-mode buffer local?

I would like electric-pair-mode to be enabled only in the buffers where I am editing, say, Emacs Lisp. But it seems that electric-pair-mode is a "global minor mode": if it is activated in one buffer, ...
37
votes
4answers
8k views

How to override major mode bindings

Sometimes my global keybindings are overridden by a major mode. An easy example is the following setting in my init file (global-set-key (kbd "C-j") 'newline-and-indent) But annoyingly this ...