[gnome-builder] emacs: use tab to reindent line if an indenter is present
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] emacs: use tab to reindent line if an indenter is present
- Date: Sun, 11 Oct 2015 02:53:53 +0000 (UTC)
commit 3788c00cc800e394fadb9b488df47cf458375efa
Author: Christian Hergert <chergert redhat com>
Date: Sat Oct 10 22:53:30 2015 -0400
emacs: use tab to reindent line if an indenter is present
Sort of like defering to the minor mode. If we have an indenter, then we
can reindent the line based on the indenters request. If there is no
indenter, then a tab will be inserted. (Tested with Makefiles).
data/keybindings/emacs.css | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/data/keybindings/emacs.css b/data/keybindings/emacs.css
index d586c2d..47d4b1e 100644
--- a/data/keybindings/emacs.css
+++ b/data/keybindings/emacs.css
@@ -101,6 +101,11 @@
bind "F9" { "action" ("workspace", "toggle-sidebar", "") };
}
+ binding-set builder-emacs-source-view-has-indenter
+{
+ bind "Tab" { "reindent" () };
+}
+
@binding-set builder-emacs-source-view-x
{
bind "<ctrl>c" { "action" ("app", "quit", "") };
@@ -152,6 +157,17 @@ IdeSourceViewMode.default
gtk-key-bindings: builder-emacs-text-entry, builder-emacs-source-view, builder-emacs-text-view;
}
+GtkSourceView,
+IdeSourceViewMode.default.has-indenter
+{
+ -IdeSourceViewMode-repeat-insert-with-count: true;
+
+ gtk-key-bindings: builder-emacs-text-entry,
+ builder-emacs-source-view-has-indenter,
+ builder-emacs-source-view,
+ builder-emacs-text-view;
+}
+
IdeSourceViewMode.emacs-x {
-IdeSourceViewMode-display-name: "C-x";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]