Fork me on GitHub

For folks who are curious about Corgi development, I did a small write-up of how we're approaching key bindings

corgi-emacs 5

It's also possible to preemptively remove bindings from all foreign modes. It's what I do - my least favorite thing in the world is hitting a shortcut by accident and invoking some crazy command with it IMO Emacs got wrong the whole notion of "modes define keybindings". It's users who should - according to their preferences and usage patterns


100% agree, do you have some pointers for bulk removing key bindings? I've looked at it in the past but didn't find an elegant solution.


I think that my approach boils down to iterating and invoking global-unset-key over each item. There might be some other step needed for a comphensive removal, but that should buy a good first 99%!


Would Corgi provide / support an alternative keybinding for Esc, for example pressing fd in quick succession in insert mode returns to normal mode? This is the first thing I usually add to Neovim, so assume its not a common Vim binding


it conflicts with a vim binding, you'll have to make a case that this is an order of magnitude more useful and thus worth breaking vim compat over


Can you elaborate on what vim binding the fd key binding conflicts with? I am aware of the f binding by itself in normal mode to find a character on the current line, but not aware of a vim binding for the fd combination. I couldnt find anything in a search. Its something I specifically add to NeoVim, so curious as to what I am replacing. Thank you.


if f is bound then you can't bind fd, right? it's either a command or a prefix key

f               f{char}         1  cursor to Nth occurrence of {char} to the


But f isn't bound to anything but the f character in insert mode, or have I missed something?


oh of course right we're talking about insert mode, yes f inserts itself, sorry for being a bit slow 🙂


I'm aware of this fd hack but not sure how widespread it is... feel free to open an issue, it's worth considering, or at least providing a snippet for people

👍 1

turn  this

  [de.otto/nom "0.2.0"]

  into this

  de.otto/nom {:mvn/version "0.2.0"}

(defun lein-deps-to-deps (beg end)
  (interactive "r")
   "\\1 {:mvn/version \\2}"
I wanted this function sometimes


related, this is a bb script I use to turn project.clj into deps.edn. Sometimes still requires manual editing afterwards but it's very helpful as a starting point

👍 1
👀 1