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
1answer
24 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
16 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
36 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
33 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
23 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
73 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
29 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
32 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
29 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
59 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
56 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
54 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
11 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....
0
votes
0answers
21 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
23 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
23 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
17 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
25 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
19 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
23 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
18 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
44 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. ...
2
votes
2answers
38 views

Shortcut to put the selected region in an ordinary LaTeX environment (not with begin-end style) using auctex

In auctex if one has a selected region and then apply the command c-c c-e (LaTeX-environment) then by selecting an environment, the selected region will be folded between that environment. Is there a ...
2
votes
1answer
132 views

Changing the prefix of many chords

It just occurred to me that the org-babel prefix C-c C-v must be what it is because of the proximity of c and v in qwerty, and that it would be better for me to use C-c C-f. Is there a simple way to ...
2
votes
1answer
74 views

How to revert a buffer using the “g” shortcut

I can refresh my dired buffer using M-x revert-buffer and I've seen multiple places that I can do this more easily using g but don't understand how that would be run. Does it mean M-x g or running g &...
1
vote
1answer
27 views

How to define a function that calls two commands where the first one requires an arguments

I use emms to play music in emacs and I have this function to add a music directory and shuffle it. (defun my-emms-command() "Run `emms-add-directory' and `emms-...
1
vote
1answer
118 views

Spacemacs keybinding to execute shell script in directory the file in the current windows buffer is located in

I need a keybinding (either a key like F12 or a mnemonic key sequence like SPC f12) in Spacemacs. When hitting the keybinding in a window containing a file in its buffer the shell script script in the ...
1
vote
1answer
22 views

org-use-extra-keys won't load

I'd like to get access to org mode's extra keys. However, although the value of org-use-extra-keys is set to "on (non-nil)" (and has been for several Emacs sessions), I don't seem to have access to ...
1
vote
0answers
58 views

How to bind Ctrl-Super-[? [closed]

I tried (global-set-key (kbd "C-s-[") 'xxx) but when I use it I get: <C-s-268632091> is undefined
0
votes
0answers
17 views

evil-embrace: remove default mappings

I use evil-embrace together with evil-surround and remapped the evil-surround keys with: (setq-default evil-surround-pairs-alist '((?b . ("(" . ")")) (?c . ("{" . "}")) ...
4
votes
1answer
62 views

How to bind 'C-u M-x shell' to 'C-c s'? [duplicate]

I would like to define the keybinding C-c s which should start a new shell in the current directory (so C-c s should behave like C-u M-x shell). I know how to define a keybinding based on a function (...
1
vote
1answer
23 views

binding M-[ causes mouse focus to insert characters

I have bound M-[ to backward-paragraph. This causes a problem in terminal mode, whereby every time the mouse enters or leaves the frame (i.e., Emacs gains or loses focus), the characters I and O are ...
0
votes
1answer
49 views

set key for 'comment-or-uncomment-region in python-mode

i want a shortcut for the nice little function comment-or-uncomment-region. The thing is, it works fine for me in every mode using M-x comment-or-uncomment-region. And espacially it works differently (...
0
votes
1answer
69 views

Disable left win key in Emacs for Windows

With AutoHotkey If I press the key Win alone, then nothing happens. That's true except with Emacs, because it opens the Windows menu. Is there a way to prevent it? Update: In AHK I have exaclty ...
6
votes
1answer
157 views

How do I keep Mac Emacs from trapping M-`?

I want to use the command key on my Mac as the meta key, so I customize ns-command-modifier. But I also want to still use ⌘-` to cycle through all the windows in Emacs - just like in all other Mac ...
3
votes
3answers
95 views

How did some of my text get highlighted with a magenta background?

I pressed some combination of letters by mistake and part of my Python buffer got a purple background color (or magenta, fuschia, violet, orchid, depending on knowledge of colors). The only way I ...
0
votes
1answer
99 views

OS copy/paste not working for emacs-mac

GNU Emacs 26.1 (build 1, x86_64-apple-darwin16.7.0, Carbon Version 157 AppKit 1504.83) of 2019-01-27 I just recently installed the emacs-mac port of GNU Emacs 26, and the OS copy/paste functionality ...
1
vote
1answer
27 views

How to enable Ctrl-Option combinations with OS X

I can't get simultaneous presses of Ctrl + Option and other keys to register in Emacs. For example, if I press Ctrl-h c (describe-key-briefly) and then Ctrl-Opt-f, it doesn't recognize that I've ...
1
vote
1answer
108 views

Emacs evil-mode C-c/C-x to “cc”/“cx”. ( key translation)

I read in evil wiki that I can change prefix keys such as C-c or C-x and so on to cc, cx, but I'm not experienced in Elisp and I tried a lot of variants but I can only define c as C-c but not a cc to ...
2
votes
1answer
46 views

Emacs think there is an accented character in the keystroke

Version GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F2511)) of 2018-05-31 Use emacs -Q with following config: (setq mac-command-modifier 'super) (...
0
votes
0answers
30 views

Can not keep keybindings

How can I keep key-bindings in all modes? Following bindings are initially working though overwritten by another major mode e.g. org (defun dotspacemacs/user-config () (exwm-input-set-key (kbd "M-h")...
2
votes
1answer
22 views

Binding a key to 'open -a Terminal .' on macOS

I'd like to do something like this (global-set-key (kbd "C-c t") (kbd "M-! /usr/bin/open -a Terminal . RET")) ... in order to open a (real, the) terminal from the current working directory in macOS ...
0
votes
2answers
70 views

pdb within eshell up/down keys dont work

I am running python3 in eshell. When I use import pdb; pdb.set_trace() in my code, pdb opens within eshell. Everything works in pdb but the up/down keys don't work for running the previous command. ...
0
votes
0answers
27 views

Extending ido-find-file to call deadgrep produces minubuffer error

I'm trying to add a key binding to ido-find-file, so that it calls deadgrep from the current directory. Similar to how pressing C-d from ido-find-file calls dired. The problem is that both deadgrep ...
1
vote
1answer
45 views

use euro symbol (or any symbol) for emacs keybinding

I set up this duplicate line function: https://kundeveloper.com/blog/duplicate-line/ and bound it to the euro symbol like this: (global-set-key (kbd "M-€") 'duplicate-line) And it worked (for a ...
0
votes
1answer
30 views

Binding simple keys in spacemacs

I would like to set a projectile find file function to the hotkey C-e, and a elpy-goto-definition function to the hotkey F12, but I'm not sure why spacemacs is not recognizing the config that I'm ...