[gnome-builder] vim: add ":bprevious" command



commit ee7b1b36ae079713973ca6189323f2ced7001875
Author: Alexandre Franke <alexandre franke gmail com>
Date:   Fri Apr 3 02:31:45 2015 +0200

    vim: add ":bprevious" command
    
    Treats "tabs" as buffers and switches to the previous one.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=747343

 src/vim/gb-vim.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/vim/gb-vim.c b/src/vim/gb-vim.c
index 88c1b43..b75e5c8 100644
--- a/src/vim/gb-vim.c
+++ b/src/vim/gb-vim.c
@@ -576,6 +576,16 @@ gb_vim_command_bnext (GtkSourceView  *source_view,
 }
 
 static gboolean
+gb_vim_command_bprevious (GtkSourceView  *source_view,
+                          const gchar    *command,
+                          const gchar    *options,
+                          GError        **error)
+{
+  gb_widget_activate_action (GTK_WIDGET (source_view), "view-stack", "previous-view", NULL);
+  return TRUE;
+}
+
+static gboolean
 gb_vim_command_cnext (GtkSourceView  *source_view,
                       const gchar    *command,
                       const gchar    *options,
@@ -851,6 +861,7 @@ invalid_request:
 
 static const GbVimCommand vim_commands[] = {
   { "bnext",       gb_vim_command_bnext },
+  { "bprevious",   gb_vim_command_bprevious },
   { "cnext",       gb_vim_command_cnext },
   { "colorscheme", gb_vim_command_colorscheme },
   { "cprevious",   gb_vim_command_cprevious },


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