Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [key-bindings]

Keyboard shortcuts, key chords, key sequences, hotkeys, or any association between key combinations and corresponding actions in Emacs.

1
vote
1answer
28 views

No confirmation for changing global key bindings Interactively in Emacs

I have tried to add global key-bindings to Emacs interactively via M-x global-set-key by following the guidelines in the Emacs Manual. When I add a keybinding though there is no confirmation prompt so ...
0
votes
1answer
870 views

How to assign TAB to indentation and to yasnippet expand key

i'm trying to have the key TAB to: Indent my code (like in any other text editor) Trigger Yasnippet I have theses lines in my config: (global-set-key (kbd "TAB") 'yas-expand) (global-set-key (kbd "...
1
vote
1answer
204 views

How to bind meta-shift-arrow to mark one word at a time

I am having trouble of marking one word at a time (ctrl-shift-arrow or meta-shift f/b) when connecting from one of my terminals. I would like to bind it also to meta-shift-arrow. I couldn't find what ...
4
votes
3answers
794 views

Custom C-M-; key binding

I have a custom comment-dwim-line command that I want to bind to the key combination C-M-; (in other words, control, meta and ; buttons pressed simultaneously). The built-in comment-dwim command is ...
2
votes
1answer
47 views

When using `lisp-state`, how can we repeat an action like slurp, and bind a key to easily perform the repeat?

In vim, I frequently used the "." shortcut for repeating the last command. I found this extremely useful especially when working with clojure tools to do things like slurp-ing and barf-ing to refactor ...
1
vote
0answers
36 views

Using keyboard commands

I am Using Emacs GUI on Windows 10 and am having problems entering commands. I am attempting to use C-h t and I am getting the error message C-c h is undefined. What am I doing wrong?
2
votes
3answers
299 views

How to create a keybinding to a file in Emacs?

I have a frequently opened file in Emacs, which is deep inside my device. I want to bind the F5 key(or any other key) to open that file, how can I do that? (Using android to run emacs. [GNURoot, ...
4
votes
2answers
93 views

Understanding “It is bound to …” message in describe-function

If you ask for a function description, there is a line that starts: It is bound to <...> <...> <...> For example, for isearch it says: It is bound to <menu-bar> <search&...
1
vote
2answers
13 views

Unbind CUA <C-return> key only in dired mode

Goal: unbind <C-return> key ONLY in dired mode in order to rebind it to dired-w32explore. My configuration is using use-package with something like this: (use-package dired :init (unbind-...
0
votes
0answers
25 views

Rebind C-x b to ivy-switch-buffer

I find ivy-switch-to-buffer is handy abo-abo/swiper: Ivy Is it possible to bind the function to C-x b Additionally, my C-x C-b is bonded to ibuffer How could rebind it to function 'helm-buffer-list"...
1
vote
2answers
337 views

How to properly change defcustom prefix key

In a library I use a prefix key defined like this: (defcustom ensime-mode-key-prefix [?\C-c] "The prefix key for ensime-mode commands." :group 'ensime-mode :type 'sexp) In my config file I've ...
2
votes
1answer
220 views

Setup a local key for help in tide

I'm trying to setup the F1 key for documentation within typescript mode only. Here is what I got so far. (use-package tide :init ;; (add-hook 'before-save-hook 'tide-format-before-save) ;; ...
2
votes
1answer
149 views

Generate dynamic keybindings depending on keyboard layout

This is a bit of an esoteric request so I will try to phrase it clearly. I am currently beginning to learn colemak and doing so through a series of transitional layouts that go by the group name of ...
0
votes
1answer
64 views

What keys can I use to create/delete and select side windows?

I have a shell buffer that's a good candidate for a side window: I also regularly use an org buffer, that's always good to have around. https://www.gnu.org/software/emacs/draft/manual/html_node/elisp/...
0
votes
2answers
84 views

Show Link Tooltip mouse over with keystroke

When I use mouse-over on an Link (thanks to Tobias) it shows an Image and text. When I used display-local-help the image disappeared (perhaps due to lack of space in the message area). I want to ...
2
votes
2answers
531 views

Spacemacs: How do I set a key in anaconda-mode?

I'm using the python-layer and am trying to set M-r to run replace-string while editing Python files. I've tried all of the options below from inside the function dotspacemacs/user-config. Help? ;; ...
0
votes
1answer
33 views

What function does C-x invoke?

I learned that M-x invokes command execute-extended-command. Extended commands - GNU Emacs FAQ What command does C-x invoke? I looked through the reference but failed to find the answer.
0
votes
1answer
302 views

How do I bind keys using general.el alongside evil?

My goal is to bind SPC SPC to counsel-M-x. I've tried using this snippet from this post (use-package general :ensure t :config (general-evil-setup t) (general-define-key :states '(normal visual ...
3
votes
1answer
39 views

Binding a key sequence to a key sequence instead of a command

In my .emacs, I tried to use (global-set-key (kbd "M-r") (kbd "C-x r j") so I can use M-r to jump to a register. However, doing this and using the command gives After 0 kbd macro iterations: Args ...
2
votes
1answer
49 views

Assign TAB in markdown mode

Running emacs 25.2.2, general, evil and markdown-mode installed from MELPA. The problem is when I hit TAB on a heading in a markdown file, it does not cycle visibility of content. C-h k TAB shows it ...
2
votes
1answer
86 views

Use mouse buttons as modifiers

I want to make use of a Thinkpad trackpoint's thumb buttons which I almost never use in Emacs anyway. I'd like to use them as additional Controls in Emacs, and in Emacs only. I've found this answer, ...
0
votes
1answer
58 views

How do I override a keybinding defined by evil-mode?

I've searched for this before but I've only seen questions like the below: https://stackoverflow.com/questions/683425/globally-override-key-binding-in-emacs How to override major mode bindings I don'...
0
votes
1answer
45 views

Shift + cursor stopped behave as usual in org mode

after a package update and restart shift+arrow does not behave as usual in org mode: move one day up/down in dates or cycling between statuses (todo, done, waiting...) in task lists. org-support-...
1
vote
2answers
83 views

Spacemacs: change prefix key from `SPC-b` to `SPC-v`

I use buffer (SPC-b) prefix key very often, and would like to move its keymap to a more convenient key (e.g. SPC-v). Is there a way to achieve this without redefining the entire map? so I would like ...
1
vote
1answer
25 views

Browse url at point when clicking and pressing super

I am trying to make emacs open the url displayed under the current point when I left click and press the super key at the same time. I am trying with this code but it does not work (global-set-key (...
2
votes
3answers
32 views

Advertise a binding for TeX-next-error in AucTeX

How can I advertise a binding for TeX-next-error in AucTeX?I There are several bindings for next-error, normally C-x `, M-g n, M-g M-n. With (put 'next-error :advertised-binding "\M-gn") I will see ...
-1
votes
0answers
18 views

Add minor mode which override evil shortcut

I want to create a minor mode to resize windows in emacs, like the resize mode of i3. I try many things, but evil shortcuts always override my minor mode... My minor mode: (defvar my-window-resize-...
7
votes
4answers
724 views

The C-x C-j binding for dired-jump stopped working

I used to have a keyboard shortcut for the following action: "Open the folder containing this file in Dired+, and place point (cursor) on the file" I believe it was C-x C-j, and I don't recall ...
2
votes
1answer
229 views

Unable to disable binding defined by undo-tree

There are two bindings for undo-tree-undo(C-_ and C-/) and undo-tree-redo(M-_ and C-?) defined in undo-tree, but now I don't want those bindings(delete those), I just want to bind C-z to undo-tree-...
0
votes
1answer
84 views

Closing flyspell correction suggestions popup

If I goto correct a word with flyspell-correct-at-point, a word suggestion box will appear, as expected. Unfortunately I cannot close this suggestion box with escape I have to use C-g. Any ideas on ...
0
votes
1answer
108 views

Enter does nothing in NeoTree

I have NeoTree installed. When I navigate through folders and files in it and when I press enter, nothing happens. I don't get into a directory. I've tried TAB also -- nothing. M-x describe-key ...
1
vote
2answers
39 views

How to disable a keybind to allow shift selection with custom cursor keybind [closed]

I have back-to-indentation bound to M-u. When I hold Shift with M-u I'm unable to select the text because M-U (note the capital 'U') is bound to upcase-word So I disabled that bind by putting: (...
0
votes
1answer
73 views

How to limit keybinds to normal mode and not to override keybinds in minibuffer?

I've keybinded &é"'... to selecting windows: (global-set-key (kbd "²") 'select-window-0) (global-set-key (kbd "&") 'select-window-1) (global-set-key (kbd "é") 'select-window-2) (...
0
votes
1answer
36 views

Emacs subshell: how to select options by moving up and down arrow keys?

I open a subshell session using M + x shell and I create a Nuxt.js application using: yarn create nuxt-app myproject. During the installation process, I am suggested which packages/frameworks/...
2
votes
1answer
52 views

M-= shortcut suddenly stops working in Emacs in KDE

I'm trying to run M-= on a region of text, but nothing happens. I think the shortcut is registered (I don't get a message like "M-= is undefined") but the execution stops for some reason and there is ...
1
vote
1answer
44 views

“ESC” no longer works as meta; how can I restore functionality?

I mistyped some command sequence and ESC stopped working as a meta prefix in Aquamacs (it still functions as usual in the command-line emacs, including both Apple's system version and the command-line ...
1
vote
1answer
133 views

Whenever I type a caret in emacs, it waits for me to type another character. Can I disable that behaviour?

I'm a relatively new user to emacs, having just come over from many years of using vim. I'm mostly thrilled with evil mode and emacs in general, but there are a few annoyances still lingering. One of ...
5
votes
3answers
716 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, ...
3
votes
1answer
98 views

Cua-mode and keyboard macros

I have just started using emacs, so I decided to use cua-mode. I got this weird problem when I'm using macros and copy/cut (C-c/ C-x). let's assume this simple macro for example: <F3> C-S-right ...
0
votes
1answer
670 views

Org-mode completion: remapping `M-TAB`

(Using latest version of Spacemacs, on Windows) I'm new to org-mode and really need to figure out how to get completion working for stuff like tags and #+ options. Apparently org uses pcomplete as ...
0
votes
1answer
286 views

How to Remap org-mode keybindings?

As mentioned in this question, I can not use org mode properly within tmux. So, I would want to remap keybindings like alt+RET for creating a new bullet item or shift + left/right arrow to change an ...
0
votes
1answer
40 views

Unbind all keys from mode

I would like to prevent modes to add any custom keys to emacs. For example this works for default key map: (global-set-key (kbd "C-c") nil) And this works for ensime: (eval-after-load "ensime-mode"...
2
votes
3answers
151 views

Keybinding conditional on cursor location?

How do I bind a key to do one thing at the beginning of the line, and another thing everywhere else? I would like to ask about the possibility that pressing the <home> key when the cursor is at ...
6
votes
2answers
96 views

Is it possible to use let-binding for setting keys?

in LaTeX mode C-cC-f calls the tex-file function. I performed a litte tweak to that function and I wrote a tex-file-mod function. Now I'd like to call the tex-file-mode with the same key-binding ...
1
vote
3answers
629 views

Shift key is not working after Meta key (Mac OSX) [closed]

My Shift key is usually working but the combination M-S- is not, and M-S- is sometimes pretty useful in org-mode. It's not just for org-mode, though. I tried describe-key but when I enter S- after M- ...
0
votes
3answers
61 views

C-x requires to look down at keyboard, interrupting flow [closed]

I'm trying to get used to emacs (really trying). I use a small apple keyboard. I can't see (in physical terms) how I will ever be able to do C-x without dropping my gaze from the screen and what I ...
0
votes
1answer
32 views

How can I get RET to follow org-mode links when using evil-mode?

In org-mode, the link-following behaviour of RET, that should be present when org-return-follows-link is set, doesn't work in evil-mode. MWE from emacs -q: Load an org buffer containing a link. Note ...
0
votes
1answer
44 views

How rollback settings without restart Emacs?

windows 10, emacs 26.1 In my init.el (with-eval-after-load 'magit-status (define-key magit-status-mode-map (kbd "C-<tab>") nil)) This disable C-<tab> after magit-status was load. And ...
0
votes
2answers
67 views

Cannot bind <M-s-left>

I use elpy as Python IDE. I want M-<left> and M-<right> (M = alt) not to be overridden by elpy with elpy-nav-indent-shift-left and elpy-nav-indent-shift-left but insted bind these to ...
0
votes
1answer
35 views

Backspace strange behaviour when word selected and cursor after open parenthesis

I got a strange issue when I hit backspace while some text is selected and my cursor is close to an open parenthesis, example: b(aaa) If I select aaa and my cursor is on the first a, I would like ...