[gnome-builder/gnome-builder-3-18] command-bar: Add a few deletion shortcuts



commit 87e0b4cd3c06a0e4d3d898892a67a9b36bfd4977
Author: Damien Lespiau <damien lespiau intel com>
Date:   Wed Oct 14 21:38:10 2015 +0100

    command-bar: Add a few deletion shortcuts
    
    Trying builder made me release I use ctrl-w quite often to delete words
    preceding the cursor. The command-bar is no exception and I'm missing
    ctrl-w enough to go and add it.
    
    Because shells support this key binding and so does vim's 'command bar',
    I figured it was general enough to be in shared.css (or should have it
    been defaults.css?).
    
    While at it, I added a couple slightly more esoteric deletion-related
    shortcuts.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756591

 data/keybindings/shared.css |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/data/keybindings/shared.css b/data/keybindings/shared.css
index bd3973e..8c8718c 100644
--- a/data/keybindings/shared.css
+++ b/data/keybindings/shared.css
@@ -16,3 +16,16 @@
 VteTerminal {
   gtk-key-bindings: builder-vte-terminal;
 }
+
+ binding-set builder-command-bar-entry
+{
+  bind "<ctrl>u" { "move-cursor" (paragraph-ends, -1, 0)
+                   "delete-from-cursor" (paragraph-ends, 1) };
+  bind "<ctrl>h" { "delete-from-cursor" (chars, -1) };
+  bind "<ctrl>w" { "delete-from-cursor" (word-ends, -1) };
+
+}
+
+GtkEntry.gb-command-bar-entry {
+  gtk-key-bindings: builder-command-bar-entry;
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]