static bool Replace(ViBuilderContext ctx)
        {
            ctx.RunAction((ViEditor e) => e.SetMode(ViEditorMode.Replace));
            ctx.SuppressCompleted();

            ctx.Builder = ViBuilders.InsertBuilder(insertActions);
            return(true);
        }
 static ViBuilderContext()
 {
     normalBuilder =
         ViBuilders.RegisterBuilder(
             ViBuilders.MultiplierBuilder(
                 ViBuilders.First(normalActions.Builder, motions.Builder, nonCharMotions.Builder)));
     insertActions = ViBuilders.First(nonCharMotions.Builder, insertEditActions.Builder);
 }
Exemple #3
0
 public static ViBuilder RegisterBuilder(ViBuilder nextBuilder)
 {
     return((ViBuilderContext ctx) => {
         var k = ctx.LastKey;
         if (k.Char == '"')
         {
             ViBuilders.StartRegisterBuilder(ctx, nextBuilder);
             return true;
         }
         else
         {
             ctx.Builder = nextBuilder;
             return ctx.Builder(ctx);
         }
     });
 }
Exemple #4
0
 public static ViBuilder MultiplierBuilder(ViBuilder nextBuilder)
 {
     return((ViBuilderContext ctx) => {
         var k = ctx.LastKey;
         if (char.IsDigit(k.Char))
         {
             ViBuilders.StartMultiplierBuilder(ctx, nextBuilder);
             return true;
         }
         else
         {
             ctx.Builder = nextBuilder;
             return ctx.Builder(ctx);
         }
     });
 }