git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2] git-gui: Handle Ctrl + BS/Del in the commit msg

From
Ismael Luceno <ismael@iodev.co.uk>
Date
Feb 16, 2019, 03:10 UTC
Message-ID
<20190216031051.8859-1-ismael@iodev.co.uk>
- Control+BackSpace: Delete word to the left of the cursor.
- Control+Delete   : Delete word to the right of the cursor.

Originally introduced by BRIEF and Turbo Vision between 1985 and 1992, they were adopted by most CUA-Compliant UIs, including those of: OS/2, Windows, Mac OS, Qt, GTK, Open/Libre Office, Gecko, and GNU Emacs.

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
---
Notes:
    Changes since v1:
    - Improved commit message.
 git-gui.sh | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/git-gui.sh b/git-gui.sh
index 5bc21b878d41..e00d9a345294 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -3788,6 +3788,8 @@ bind $ui_comm <$M1B-Key-KP_Subtract> {show_less_context;break}
 bind $ui_comm <$M1B-Key-equal> {show_more_context;break}
 bind $ui_comm <$M1B-Key-plus> {show_more_context;break}
 bind $ui_comm <$M1B-Key-KP_Add> {show_more_context;break}
+bind $ui_comm <Control-Key-BackSpace> {%W delete {insert -1 chars wordstart} insert;break}
+bind $ui_comm <Control-Key-Delete> {%W delete insert {insert wordend};break}
 
 bind $ui_diff <$M1B-Key-x> {tk_textCopy %W;break}
 bind $ui_diff <$M1B-Key-X> {tk_textCopy %W;break}
-- 
2.20.1
Next: Junio C Hamano
Message 1 of 5 in “git-gui: Handle Ctrl + BS/Del in the commit msg”
  1. git-gui: Handle Ctrl + BS/Del in the commit msgIsmael Luceno, Feb 16, 2019
  2. Junio C HamanoFeb 20, 2019
  3. Ismael LucenoFeb 21, 2019
  4. Junio C HamanoFeb 21, 2019
  5. Ismael LucenoMar 4, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.