Fork me on GitHub
#emacs
<
2023-01-15
>
Joseph Graham10:01:07

I have an extra brace which paredit will not let me delete

Young-il Choo10:01:37

Try marking the brace as a region, then kill-region.

👆 2
practicalli-johnny10:01:42

If using Evil, r { to select the brace and replace with a { (or any other character required)

practicalli-johnny10:01:53

Or toggle paredit off, change the character and toggle paredit on again

Joseph Graham11:01:26

I toggled it off to fix it 🙂

moe12:01:31

hey, it works for the Nintendo

moe12:01:07

(i also turn if off if i do a bad paste)

Derek16:01:18

M-x delete-char

Derek16:01:33

paredit will rebind your keys but the previously bound commands are still available

Joseph Graham16:01:46

AH OK, I'll try that next-time!

mkvlr18:01:33

I use cut and paste to work around this

adi05:01:19

I type a semicolon and delete two characters in reverse

Benjamin06:01:02

M-x fundamental-mode edit, save revert-buffer

lassemaatta18:01:11

any tips on how to organize custom keymaps/bindings? I started to build my own keymaps under the C-c prefix, which sort-of works: Ideally I'd like to press C-c and have which-key show only those keybindings I've setup. But apparently a lot of minor modes also store their keybindings under the C-c prefix, so instead of seeing just my own keybindings I get dozens and dozens of extra bindings.

lassemaatta18:01:10

I guess I could just add another level of nesting and store my own prefixes and bindings under C-c <some letter>, but that seems not terribly elegant as it requires an extra key press every time

teodorlu18:01:22

I use Doom Emacs and have a Norwegian keyboard, and I have most of my custom key bindings under SPC ø and SPC å. My rationale: 1. I don't want my stuff to collide with other stuff 2. I accept a three letter chord - once ingrained in muscle memory, it goes fast enough for me. 3. Like you, I get all my actions listed after pressing SPC ø, so I can easily see what I've got. There are probably other approaches that work well. I tried one, haven't been unhappy with it so far, so I've stuck to it.

👍 2
lassemaatta18:01:59

yeah, I've similarly bound some functions under C-ä and C-ö 🙂 perhaps it's just easier to choose a different prefix rather than the preferred C-c

Matti Uusitalo14:01:09

Those are rather safe choices, I would imagine

narendraj922:01:08

I have the following in my Emacs configuration:

(define-key input-decode-map
              ;; Default: \C-i => TAB
              "\C-i" "\C-c")

  (define-key input-decode-map
              ;; Default: \C-[ => ESC
              "\C-[" "\C-x")

  (define-key input-decode-map
              ;; Default: \C-m => RET
              "\C-m" [C-m])

  (bind-keys* :prefix [C-m]   :prefix-map ctl-m-map)
  (bind-keys* :prefix "C-'"   :prefix-map ctl-quote-map)
  (bind-keys* :prefix "C-."   :prefix-map ctl-period-map)
  (bind-keys* :prefix "C-;"   :prefix-map ctl-semicolon-map)
If you like, you can even use C-i, C-[ and C-m for entirely different and new keymaps if you are okay with losing their default bindings.