[gnome-builder/wip/halfline/repeatable-indent: 4/4] vim: support replaying '>' with '.' command



commit 9cfb2ebe8e1779c2b613301991475bac98eae62c
Author: Ray Strode <rstrode redhat com>
Date:   Tue Feb 10 14:37:27 2015 -0500

    vim: support replaying '>' with '.' command
    
    One reasonable way to reindent code in vim is to select
    the lines, hit '>' to indent one time and then hit '.'
    several times until the desired indention level is reached.
    This doesn't work in gnome-builder because the '>' command
    isn't recorded.
    
    This commit make sure '>' (and '<') get recorded, so they
    can be replayed with '.'
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744286

 src/vim/gb-source-vim.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/vim/gb-source-vim.c b/src/vim/gb-source-vim.c
index bceff6b..fafe3b9 100644
--- a/src/vim/gb-source-vim.c
+++ b/src/vim/gb-source-vim.c
@@ -4741,8 +4741,10 @@ gb_source_vim_cmd_indent (GbSourceVim *vim,
 
   count = MAX (1, count);
 
+  gb_source_vim_recording_begin (vim, '>', modifier);
   for (i = 0; i < count; i++)
     gb_source_vim_indent (vim);
+  gb_source_vim_recording_end (vim);
 }
 
 static void
@@ -4756,8 +4758,10 @@ gb_source_vim_cmd_unindent (GbSourceVim *vim,
 
   count = MAX (1, count);
 
+  gb_source_vim_recording_begin (vim, '<', modifier);
   for (i = 0; i < count; i++)
     gb_source_vim_unindent (vim);
+  gb_source_vim_recording_end (vim);
 }
 
 static void


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