Stack Exchange Network

Stack Exchange network consists of 175 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.

0
votes
1answer
45 views

How to call export function, bypassing interactive menu

The shortcut C-c C-e is linked to org-export-dispatch. Whenever I want to export my current org buffer as html, I do C-c C-e R R, which is Export to reveal.js HTML Presentation -> To File. I am ...
0
votes
1answer
51 views

C-x-TAB not followed by options

I am after the key-binding C-x-TAB S-rightarrow to indent each line in a block by a TAB see - https://www.gnu.org/software/emacs/manual/html_node/emacs/Indentation-Commands.html. I always open emacs ...
0
votes
1answer
175 views

How to type S-<LEFT> during indent-rigidly?

How to type S-LEFT during the transient mode after C-x <TAB> (indent-rigidly)? Particularly, I am after this command C-x <TAB> This command is used to change the indentation of ...
0
votes
1answer
141 views

How to type `C-M-\` [closed]

How to type C-M? Particularly, I am after this command - from https://www.gnu.org/software/emacs/manual/html_node/emacs/Indentation-Commands.html First attempt Select the text Use the combination ...
0
votes
0answers
54 views

Using Emacs as a daemon (emacsclient) exhibiting weird behavior

Whenever I use Emacs as a daemon it seems like my init file isn't being fully loaded. My keybindings in particular are acting very odd. I use some unorthodox keybinds; for example: Ctrl+u = ...
3
votes
1answer
250 views

spacemacs key bindings in plain vanilla evil emacs

As the title suggests, I would like to use spacemacs like keybindings in plain vanilla evil emacs. The spacemacs key bindings are very intuitive. But the package is too heavy for my low-end laptop. ...
0
votes
1answer
32 views

orgDefine a keyboard binding that works only in org-agenda when under evil

Using emacs 25.2.2 on Kubuntu 18.04 with evil and evil-org. Here is a very basic question that I could not get a clear answer for, despite googling. I want to define a keyboard binding that works ...
0
votes
1answer
142 views

Make C-S-up handle shift selection under Org-Mode

When shift-select-mode is on (Emacs' default), C-S-up in text mode selects the previous paragraph. This does not work under Org-Mode, where C-S-up gets translated into C-up, which is mapped to org-...
0
votes
1answer
53 views

vhdl-mode key binding not working

I want to use the vhdl-mode in Emacs. I can use the templates when working with the meta key like: M-x vhdl-template-process If i want to use the corresponding key binding like: C-c C-t P it won't ...
3
votes
1answer
114 views

Trying to make control-f search exactly like control-s does!

I am trying to configure Emacs to not only use CUA, but also for control-f to search exactly like control-s does in the standard configuration. What I have achieved is that I can key in control-f and ...
7
votes
3answers
122 views

Near-identical commands on multiple keys

Visual Studio has this nice feature where you can put the point on something, press C-f3 and it'll both find the next instance of the thing under the point and it'll remember it. You can then press ...
1
vote
2answers
151 views

How can I rebind C-n from evil-paste-pop

I am trying to bind C-n and C-p to call next-buffer and previous-buffer. They seem to conflict with some evil-mode key bindings and I don't seem to be able to overwrite them. When I press them I get ...
15
votes
2answers
1k views

Convention about using C-x or C-c as prefix keys

What are the conventions for using C-x, C-c, or M- as prefix keys? For example: is C-x, etc., for saving or visiting buffers? Is C-c, etc., for text editing? Background Maybe this is a silly ...
1
vote
2answers
40 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
69 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
1answer
26 views

Trying to make keybinding in spacemacs

I'm trying to bind ",," to eval the topmost S-expression containing the cursor in common lisp layer, from this page I assumed it would be done like so: (spacemacs/set-leader-keys-for-major-mode '...
2
votes
1answer
31 views

Emacs execute keymap entry

Emacs defines a fair variety of objects that can be bound to keys, with e.g. global-set-key. (The canonical list can be found here). I would like to simulate the invocation of a keymap entry. For ...
0
votes
0answers
40 views

“No such file or directory, bind-key” after installing use-package [duplicate]

I'm using Emacs on Windows 10. I want to override key bindings, so after reading How to override major mode bindings, I installed use-package with the built-in package manager (via M-x package-install ...
0
votes
0answers
69 views

How can I rebind my keys in Spacemacs to allow moving between windows (splits) with C+hnei? [duplicate]

I'm trying to rebind my keys for navigating between split windows. Here's what I've tried (putting this in (defun dotspacemacs/user-config): (global-unset-key (kbd "C-h")) (global-unset-key (kbd "...
1
vote
1answer
108 views

Invalid modifier in string for command unset “\C-;”

The command (global-unset-key "\C-;") fails with the message: Invalid modifier in string. Perhaps because of the special character ;. What is the proper way to unset this key? Any other normal ...
2
votes
1answer
44 views

Run command on region AucTeX

I would like to run force-compile (see Run TeX-command-run-all when there are no changes in .tex-file) on a region of my LaTeX document. (defun force-compile () "Set the file modification times on ...
1
vote
1answer
153 views

Spacemacs evil-window key bindings not working?

I have these keybindings in my dotspacemacs/user-config function: ;; Modify evil-mode keybindings from hjkl motion to jkl; ;; Motion mappings (define-key evil-motion-state-map "H" 'evil-window-bottom)...
2
votes
0answers
523 views

meta key in mac for emacs

i have been working with GNU emacs on a linux server but my keyboard is for mac. i have problem with defining alt key as meta. try (setq mac-command-modifier 'meta) in ~/.emacs.el and then eval-buffer ...
0
votes
2answers
133 views

How to overwrite C-c C-v hotkeys for LaTeX-mode-map?

Now i use this: (eval-after-load 'latex '(define-key LaTeX-mode-map (kbd "C-c C-v") nil)) (eval-after-load 'latex '(define-key LaTeX-mode-map (kbd "C-c C-v") 'my-open-file-LaTeX)) I DO NOT use ...
1
vote
0answers
33 views

Evil keybindings in reftex-toc

I would like to bind j to reftex-toc-next and k to reftex-toc-previous whilst in a reftex-toc buffer. According to the documentation, the keymap active in *toc* buffers is reftex-toc-map. I'm using ...
1
vote
1answer
75 views

Unexpected behavior using SHIFT+arrows and CTRL+arrows on emacs (orgmode) + terminal + mosh + screen

I am connecting in a machine using a terminal, mosh and then screen. Then, in my orgmode file I can't use the shortcuts like SHIFT+up, SHIFT+left or CTRL+up etc. If I press that, it produces something ...
1
vote
0answers
36 views

ALT as my modifier key stops me using a pound sign [duplicate]

I've just switched to Spacemacs (Evil mode), as it is time to change things up, having used Sublime Text for years. I have a British Mac keyboard which relies on ALT + 3 to output the pound sign (#). ...
2
votes
3answers
72 views

is there a keybinding to save curor position for returning after viewing other section of same buffer?

when i am editing a large file, often need to view other sections of the same buffer only once. But after that I need to go back to the position I was editing at. Is there a key for doing that?
0
votes
1answer
44 views

Custom Outline mode key binding

I want to set a key binding for outline-next-visible-heading but I fail to do so. I believe using hooks is a solution for this so I added this to my .emacs (defun outline-mode-test-hook() (define-...
2
votes
1answer
97 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, ...
6
votes
4answers
381 views

My left pinky hurts. Can I press another key to act as Control?

My left pinky hurts due to repetitively pressing the C button when using Emacs org mode. Not working with Emacs is out of the question, but it needs some rest. I would like to change theC key for ...
0
votes
0answers
35 views

How to enable SHIFT+TAB for multi line code region unindentation?

I have found this code which enables both TAB and SHIFT+TAB for code region indentation and unindentation. The problem is SHIFT+TAB doesn't work on multi line codes and also we have to place the ...
2
votes
1answer
103 views

Yasnippet: How to create multiple snippet key bindings

I have a yasnippet with # binding: TAB f o o in the header. This is processed by the yasnippet library as 9 102 111 111. With respect to a keymap of a major-mode, both \C-i and (kbd "TAB") are ...
1
vote
2answers
250 views

How to unbind a key from a command in general.el?

I am using emacs with evil, and space is my leader key, however, space is bind to dired-next-line in dired-mode. So, how can I unbind space, so I can still use it as my leader key in dired-mode, and ...
0
votes
1answer
66 views

How to rebind org key sequence e.g., (C-a a m)?

org-mode newbie question. I want to invoke the org agenda command that matches a tag query. Currently it is bound to C-a a m. I found the key sequence too long and wanted to bind it to a shorter ...
1
vote
1answer
144 views

Compile and run C-Programs in Emacs

I'm currently learning C with a book that has many small code examples that the reader is supposed to write, run and experiment with. I'm using Emacs as my primary tool for everything that has to do ...
1
vote
1answer
62 views

Toggle string and regex replacement

How can I quickly toggle between string and regexp versions of functions such as replace-string/replace-regexp, query-replace/query-replace-regexp etc? Pretty sure I saw a shortcut once but now I cant ...
1
vote
1answer
163 views

Keybinds on xterm and emacs-nox

I've looked on google, stack exchange, GNU emacs manual, xterm manual, etc. and still haven't found an answer that satisfies my problem(s). Problem: Using Systems: Ubuntu 16.04, xterm, emacs-nox I ...
5
votes
2answers
1k views

Open new window and switch to it

Assume I'm opening a new window with for example C-x 2 or C-x 3 then the buffer opens and I need to switch to it by hand with C-x o. Is there a build in solution to do this with one command? Or even ...
4
votes
1answer
319 views

Display corresponding key binding of command during M-x completion

As an example, when I use M-x save-buffer Emacs says in the minibuffer: You can run the command ‘save-buffer’ with C-x C-s I'm using Swiper/Ivy; I want to know if there is a way to instruct Ivy to ...
0
votes
1answer
23 views

get “jump to column” behavior of fundamental mode in a major mode

I noticed that when in fundamental-mode or prog-mode (basically any mode without an indent-line-function) the TAB key will jump between columns. For example if I have foo bar baz fot bat| ...
0
votes
1answer
148 views

OSX - turn off command key in terminal emacs

I'm trying to disable the command key when running emacs from the terminal. Whenever I mistakenly press CMD-V instead of ALT-V, the text from my Mac clipboard gets copied into the buffer. From related ...
1
vote
2answers
92 views

Aggressive C-g config

Is there a way to configure C-g (or some other key?) to not be usable as normal input in any context, part of a key binding, etc, and instead have it quit in more contexts? e.g. I'd like C-x C-g to ...
0
votes
1answer
93 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
224 views

override “C-SPC” set-mark-command

I'm using expand-region and experimenting with it trying to find the right key binding As per expand-region README it binded to (global-set-key (kbd "C-=") 'er/expand-region) But I'm not satisfied, ...
2
votes
2answers
92 views

C-x in terminal

I'm new to emacs and this has been bothering me for a while. Not only because I can't figure out how to do it but I can't find anyone else asking this question online. In M-x term, how can I make C-x ...
1
vote
0answers
55 views

Using alt for Meta with non-US keyboards

I have a non-US Mac keyboard which requires the alt key to type certain characters. In an attempt to use alt as Meta key in Emacs, I checked Use Option as Meta key in Terminal preferences. However, ...
1
vote
2answers
70 views

How to troubleshoot a key binding prompting for more key presses?

I have a function bound to Ctrl-b, this runs a command immediately, however after some time running emacs, pressing this binding shows text C-b in the message bar, prompting for other keys to be ...
1
vote
1answer
87 views

Rebind TAB to show help in counsel minibuffer

I'm in the process of migrating from helm to ivy/counsel, and I would like to replicate a binding that I had in my previous setup. When browsing the results minibuffer (for example in counsel-M-x), ...
0
votes
0answers
48 views

C-S-a doesn't select text to the line beginning

The Key combination Ctrl + Shift + a doesn't work in my GUI-Emacs to select a region from the position of pointer to the line start. Doing C-h k and the above key combination shows no documentation.