question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Usability Request: Remove "Ctrl-C Ctrl-C" from COMMIT_EDITMSG mode

See original GitHub issue

Proposed Change:

Remove special “Ctrl-c Ctrl-c” keystroke In the commit message editing mode. Instead, the users can use the standard “Ctrl-s Ctrl-w” to save and close the file in the editor. This way “Ctrl-c” is available for copying content.

Rationale

vscode users likely already have a simple way to deal with “save and close a file”, either with the default key bindings or something custom to their setup. Since C-c C-c is really just saving and closing the buffer under the hood, there is no reason to add it.

Users with the default key-bindings will definitely be surprised to find that they cannot copy text in a commit message. It has burned me when I tried to copy reproduction steps from text and then paste it into a terminal to verify a fix.

This will be a muscle memory change for users with a long history with magit, but one that should be pretty quick to get used to.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:4
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
matkladcommented, Nov 10, 2021

+1 as Emacs expat, I appreciate that C-c just works, but it gets in a way when I need to copy text. Moreover, most VS Code users are not Emacs users, and for them C-c is just O_o.

I wonder if Ctrl-Enter for commit/Escape to abort would work?

1reaction
dandavisoncommented, Nov 4, 2021

Just a note: for Mac users there’s no conflict here: copy is Cmd-c and the traditional emacs “execute & dismiss” operation used widely in e.g. magit and org-mode is Ctrl-c Ctrl-c. So for that group of users at least I think it would be a shame/inappropriate to get rid of the Ctrl-c Ctrl-c binding which, as you say, is muscle memory for a magit user.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git - How to close commit editor? - Stack Overflow
Save the file in the editor. If it's Emacs: CTRL X CTRL S to save then CTRL X CTRL C to quit or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found