[gnome-builder] keybindings: add format shortcut to all keyboard types
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] keybindings: add format shortcut to all keyboard types
- Date: Fri, 17 Dec 2021 20:51:24 +0000 (UTC)
commit 04e495723152dc306f69c845d78c2f61da034fca
Author: Günther Wagner <info gunibert de>
Date: Fri Dec 17 20:52:30 2021 +0100
keybindings: add format shortcut to all keyboard types
src/libide/gui/ide-shortcuts-window.ui | 7 +++++++
src/plugins/editor/default.css | 1 +
src/plugins/sublime/keybindings/sublime.css | 1 +
3 files changed, 9 insertions(+)
---
diff --git a/src/libide/gui/ide-shortcuts-window.ui b/src/libide/gui/ide-shortcuts-window.ui
index f1ad3f68b..82b3738b6 100644
--- a/src/libide/gui/ide-shortcuts-window.ui
+++ b/src/libide/gui/ide-shortcuts-window.ui
@@ -440,6 +440,13 @@
<property name="title" translatable="yes" context="shortcut window">Beautify selected
code</property>
</object>
</child>
+ <child>
+ <object class="GtkShortcutsShortcut">
+ <property name="visible">true</property>
+ <property name="accelerator"><shift><alt>f</property>
+ <property name="title" translatable="yes" context="shortcut window">(LSP only) Format
selected code or whole document</property>
+ </object>
+ </child>
</object>
</child>
<child>
diff --git a/src/plugins/editor/default.css b/src/plugins/editor/default.css
index 5a981d092..ea4d97fc0 100644
--- a/src/plugins/editor/default.css
+++ b/src/plugins/editor/default.css
@@ -21,6 +21,7 @@
bind "<ctrl>i" { "action" ("editor-page", "goto-line", "") };
bind "<ctrl>asciitilde" { "change-case" (toggle) };
bind "<ctrl><alt>d" { "duplicate-entire-line" ()};
+ bind "<shift><alt>f" { "format-selection" ()};
bind "<ctrl><shift>z" { "clear-count" ()
"clear-selection" ()
"remove-cursors" ()
diff --git a/src/plugins/sublime/keybindings/sublime.css b/src/plugins/sublime/keybindings/sublime.css
index 464738999..1f443f914 100644
--- a/src/plugins/sublime/keybindings/sublime.css
+++ b/src/plugins/sublime/keybindings/sublime.css
@@ -108,6 +108,7 @@
"request-documentation" ()
"clear-count" ()
"clear-selection" () };
+ bind "<shift><alt>f" { "format-selection" ()};
bind "<ctrl><super>e" { "move-error" (down) };
bind "<ctrl><super><shift>e" { "move-error" (up) };
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]