Questions tagged [key-bindings]

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

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

How to use one keybinding to execute switch-to-buffer and minibuffer-complete at one time?

C-x b runs the command switch-to-buffer TAB (translated from ) runs the command minibuffer-complete I want to have a key binding that completes these two steps at once. I mainly want to use imenu ...
0
votes
0answers
28 views

Trouble binding C-return: C- must prefix a single character

This is what I have: (add-hook 'magit-status-mode-hook (lambda () (local-set-key (kbd "<C-return>") 'magit-diff-visit-file-other-window))) Opening a magit-status buffer fails with "C- ...
1
vote
1answer
14 views

With “japanese” input method, unmap kanji selection via the spacebar?

In emacs-26.1, I am enabling the Japanese input method as follows ... (toggle-enable-multibyte-characters 1) (set-language-environment "Japanese") (set-input-method "japanese") (setq coding-system-...
0
votes
0answers
30 views

Howto define TAB and S-TAB in keymap of custom mode

I'm trying to bind the TAB and shift TAB keys to a custom readonly buffer mode. The skeleton of the mode looks like this: ;; 8< --- exmode.el ------- (defun exmode-i () (interactive) (message ...
3
votes
1answer
67 views

What is the point of the Ctrl-M binding? Can I overwrite it if I use the Return key?

Looking for a new convenient keybinding for a frequently used command I stumbled upon Ctrl-M which is the same as Return/Enter. What is the point of this binding? Can it cause some problem if I ...
0
votes
0answers
29 views

<M-S-return> (org-mode) failing on Windows install

I've just installed Emacs 26.2 on a Windows 7 machine. This is a clean install, with no previous version of Emacs installed. Editing an Org file, I want to insert a new TODO item using "M-S-return". ...
1
vote
2answers
62 views

Overwrite global-set-key in major-mode

In my .emacs file I have bound the tab-key to a function called smart-tab. (global-set-key [(tab)] 'smart-tab) (defun smart-tab () "This smart tab is minibuffer compliant: it acts as usual in ...
0
votes
0answers
13 views

How to change the value of timeout for key sequences?

I have a key sequence for M-<SPC>: (global-set-key (kbd "M-<SPC> a") 'foobar) I would like to increase the timeout between keystrokes M and <SPC> for building M-<SPC>. How ...
2
votes
3answers
34 views

Disable tex-mode's auto tex-insert-quote functionaliy

So basically, for reasons unknown we don't use regular LaTeX style quotes at my company, instead just using regular double quotes. However, tex-mode in emacs automatically substitutes the " key for ``'...
1
vote
1answer
26 views

How to bind a key in a `generic` mode?

Is there a way to bind a key in a mode defined using define-generic-mode such as xmodmap-generic-mode? Generic does not appear to create keymaps. ELISP> (require 'generic-x) generic-x ELISP> (...
1
vote
1answer
38 views

Give key binding absolute priority [duplicate]

I'd like to use M-<arrows> to move around windows in Emacs gtk, so I have added (windmove-default-keybindings 'meta) to my init.el. However, this is overridden by other modes such as elpy. Is ...
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 ...
2
votes
1answer
35 views

Prelude: How to add smartparens key bindings to C-c prefix?

I am using Emacs with Prelude. When I hit C-c prefix in a clojure buffer, I would like to show a smartparens key bindings. Like in screenshot below I would like to to add entry for smartparens key ...
0
votes
1answer
39 views

bind german mutated vowel keys to functions

I have a German keyboard and would like to bind Isearch to C-ö. How can I do this?
0
votes
2answers
31 views

Command to apply invisible property to selection

I would like to have a command that makes selected text invisible, and another to make selected text visible. Currently I have (buffer-invisibility-spec '(a . t)) (global-set-key (kbd "C-c i") (...
2
votes
2answers
114 views

Why does Shift-right says it is bound to right?

I tried to check what function shift-right is bound to which extends the region right by a character by default. But C-h k says: <right> (translated from <S-right>) runs the command right-...
1
vote
1answer
27 views

C-/ results in backspace in the Linux console

I am using emacs on many machines, and always use C-/ for undo. However, I started working on a Raspberry Pi with Arch Linux recently, using a local text terminal - X is not installed. Here, C-/ has ...
1
vote
0answers
18 views

Changing keybinding for org-capture [closed]

I expect my reception to compile my daily agenda using .org capture. But they find using C-c C; C-c C-s; C-c C-c to capture, schedule and completion respectively difficult. Can a single function keys ...
0
votes
0answers
26 views

Use arrows keys to call Lispy functions

In lispy-mode, I want to use control + the arrow keys instead of lispy's defaults (h, j, k, l). But if I run the obvious code (define-key lispy-mode-map [C-up] 'lispy-up) then C-up always ...
1
vote
1answer
40 views

Rebind just `C-c` to some command

I'd like to rebind C-c to eshell-interrupt-process, so I don't need to press C-c C-c. I tried the naive (local-set-key (kbd "C-c") 'something) And similar commands but when I press C-c emacs waits ...
4
votes
3answers
283 views

Use cases for M-0 & C-0?

The purpose of digit-argument and how to use them is described in Emacs manual. Also read a question that asks how to disable them. Even though have not disabled them, I have changed M-1, M-2, M-3 '...
0
votes
0answers
13 views

“<Hangul> is undefined” error on space key press

I'm running Emacs 26.1 without any "strange" configuration: a bare bone Ubuntu 19.04 emacs package with few packages installed from elpa or melpa. I have the following issue: when pressing space bar ...
6
votes
3answers
148 views

Progressive key bindings

In my emacs setup, I currently have two key bindings: C-C c i for command1 and C-c c j for command2. command1 outputs some text in the minibuffer while command2 insert the same text in the current ...
1
vote
1answer
27 views

Using C-x C-<left|right> for windmove

On a Mac, using Emacs 26.1, I'd like to bind my windmove functions using: (global-set-key (kbd "C-x C-<left>") 'windmove-left) (global-set-key (kbd "C-x C-<right>") 'windmove-right) (...
0
votes
1answer
31 views

How do I do the key strokes `C-M-c` in spacemacs?

I'm using spacemacs but trying to use ediff-regions-linewise to compare a couple regions of text. In order to confirm the selection, I need to do C-M-c. This is probably a silly question, but how do ...
2
votes
1answer
24 views

Evil Surround - Symbol's value as variable is void

When I execute cs<old-text-object><new-text-object> (i.e. any cs or ds action) I get the following error. Anyone know how to resolve this or at least suggestions on debugging it? evil-...
0
votes
0answers
46 views

AUCTeX no longer using pdf-tools after using :bind and :map from use-package to define keybindings for PDFView mode

I'd like to define a Hydra for PDFView mode and bind a key for it in pdf-view-mode-map. However, it seems that if I try to bind any keys for pdf-view-mode-map using :bind and :map of use-package, ...
2
votes
1answer
34 views

Specify the number of blank lines

Upon leaving multiple blank lines (saying 4 lines of blanks), I have to strike four times of Enter. Tried C-u Enter or C-3 Enter, it does not work. How could specify the number lines like C-3 space?
1
vote
0answers
28 views

How to navigate SPC commands with Vim cursor?

I am very used to Vim keys BUT I love to use Emacs. That's why Spacemacs in Evil mode is perfect for me. There is one thing I still cannot figure out how to do. I don't know how to use h,j,k,l for ...
0
votes
1answer
78 views

How can I quit from multiple-cursor mode by ESC

I want to bind ESC to quit from multiple-cursor mode. This code doesn't work: (define-key mc/keymap (kbd "<ESC>") 'mc/keyboard-quit) How can I do it?
4
votes
1answer
36 views

Mapping new command involving <escape> clear all predefined <escape> commands

I have the command fill-paragraph mapped to key <escape> q, it is mapped by default in emacs. Now I want to map the opposite command, unfill-paragraph, to key <escape> p. However, when ...
0
votes
2answers
39 views

How do I keep special modes from overriding my keybindings?

I usually have multiple windows open and switch between them often, so I put this in my init file: (global-set-key (kbd "C-o") 'other-window) ; Save a keystroke when switching windows (global-set-key ...
0
votes
2answers
41 views

How to chain isearch-forward-symbol-at-point and query-replace-regexp into a single keybinding?

I'm looking to create a keybinding that will perform the following shortcut: call isearch-forward-symbol-at-point call query-replace-regexp It's basically a shortcut for the following key combo: M-s ...
1
vote
2answers
88 views

Ctrl c Ctrl v copy paste in multi-term

I want to be able to copy paste using C-c and C-v when I edit a file and in multi-term. After more than a few hours I gave up. I would be thankful if anyone could tell me what the recommended way for ...
1
vote
3answers
68 views

Why do local-set-key and local-unset-key not work interactively? [duplicate]

My local-set-key and local-unset-key, used interactively M-x ..., are not working as expected, namely to bind or unbind a key for a specific buffer. Case in point: I am editing a LaTeX (.tex) file ...
0
votes
1answer
61 views

`C-x C-c` closes all windows on OSX

In OSX, pressing C-x C-c closes all Emacs windows instead of only the selected one. This isn't the bahavior I've come to esxpect from using Emacs on Windows, Ubuntu,or CentOS. What's up?
0
votes
1answer
14 views

Creating a macro to change dictionary and run ispell

I would like to create a simple key binding (e.g. C-c s e) to spell check the (mu4e) email message I am composing using English (and use other bindings for other languages). I thought I'd simply ...
0
votes
1answer
13 views

describe-key for sequence mappings such as those in evil-mode

So, in evil mode, something like d i b (delete inside brackets) is a common occurence. However, describe-key will immediately describe just the d part. Using (describe-key "d i b") produces: d i b is ...
0
votes
0answers
13 views

Add line to Org Agenda that is [tab]-aware for navigating a link

I have added a line to my Agenda to display how many first-level items my inbox.org has. I put stuff in there from mobile devices quickly, so I needed a reminder to process things once I get back home....
1
vote
1answer
56 views

spacemacs - rebind existing keys

I am trying to rebind j, k key as well as capital E, B and Y, but cannot get them to work. Any pointers? I put this into my .spacemacs (in dotspacemacs/user-config): (evil-define-key 'normal key-...
0
votes
0answers
19 views

Mac OSX and remote Emacs sessions, keybindings

I have questions regarding keybindings and cut & paste for Emacs and OSX v10.14.3. I'm hoping there are some Emacs users with similar configurations that can provide guidance as to be productive ...
0
votes
1answer
26 views

Force C-c to cua-copy-region

I have CUA mode enabled, but sometimes when I hit C-c, emacs simply does not copy anything because it starts to think Iam typing some C-C something command. I tried: (global-set-key (kbd "C-c") 'cua-...
1
vote
0answers
25 views

unbind ALL C-x and C-c shortcuts in org-mode with CUA-mode

For a special purpose application of emacs with org-mode I want to dramatically simplify the shortcuts. I'm already quite satisfied with my config based on CUA mode. The one thing that bothers me ...
0
votes
0answers
30 views

Why is C-i executing TAB instead of evil-jump-forward? [duplicate]

For some reason, pressing ctrl+i is sending a TAB command instead of executing evil-jump-forward. Viewing the lossage, I see: C-o [evil-jump-backward] TAB [c-indent-line-or-region] From describe-...
0
votes
0answers
34 views

Rebinding smartparens keys using Evil

I use vanilla Emacs with evil. I did not install smartparens but it is present and enabled on my system as a dependency of something. I need to rebind the M-s keys to something other than the default ...
0
votes
0answers
7 views

Shortcut to actual previous line in markdown mode, or end of section

I use markdown-mode and often fold the tree. I sometimes need to go to the last line of a tree, e.g. if I adjust the tree heading and then want to work at the last leaf. I suppose a shortcut can take ...
0
votes
0answers
20 views

How can I 'disable' left_C-x and enable only 'right_C'-x

I'm a emacs user, and my left pinkie start to feel it a bit (overuse of C-x day long) .... so I thought that before crying over some emacs induced RSI, I should unset some bindings so my bad habits ...
0
votes
1answer
28 views

How do I select surrounding block

What is the command for Emacs/Spacemacs to select the surrounding (logical) block? I know I've used this some time ago, I just don't remember how exactly :)
0
votes
0answers
22 views

Creating aliases for key sequences

I found that I can, in evil normal-state, use <leader> c as an abbreviation for (or rather alternative to) C-c: (evil-leader/set-key "c" (lambda () (interactive) (setq unread-command-...
0
votes
0answers
45 views

How to make `ESC` key act like a real Meta modifier key?

I would like to make the ESC key act like a Meta (modifier) key. For example, when I move backward by words by (M-b), I want to keep my pinky finger on ESC, not press it once for each backward move. ...