package mew_vi

  1. Overview
  2. Docs

Source file vi_action.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
(*
 * vi_action.ml
 * -----------
 * Copyright : (c) 2019 - 2020, ZAN DoYe <zandoye@gmail.com>
 * Licence   : MIT
 *
 * This file is a part of mew_vi.
 *)


type insert=
  | Append of string (* a *)
  | AppendEol of string (* A *)
  | Insert of string (* i *)
  | InsertBol of string (* I *)
  | Newline_below of string (* o *)
  | Newline_above of string (* O *)

type motion=
  (* left right *)
  | Left of int (* h *)
  | Right of int (* l *)
  | Right_nl of int (* l, including newline *)
  | Line_FirstChar of int (* 0 *)
  | Line_FirstNonBlank of int (* ^ *)
  | Line_LastChar of int (* $ *)
  | Line_LastChar_nl of int (* $ *)
  | Line_LastNonBlank of int (* g_ *)
  | Line_LastNonBlank_nl of int (* g_ *)

  (* up down *)
  | Upward of int (* k *)
  | Downward of int (* j *)
  | GotoLine of int (* gg or G *)
  | GotoLine_first (* gg *)
  | GotoLine_last (* G *)

  (* word *)
  | Word of int (* w *)
  | WORD of int (* W *)
  | Word_end of int (* e *)
  | WORD_end of int (* E *)
  | Word_back of int (* b *)
  | WORD_back of int (* B *)
  | Word_back_end of int (* ge *)
  | WORD_back_end of int (* gE *)

  | Line

  (* text object *)
  | Sentence_backword of int (* ( *)
  | Sentence_forward of int (* ) *)
  | Paragraph_backward of int (* { *)
  | Paragraph_forward of int (* } *)

  (* text object selection *)
  | Word_include of int (* aw *)
  | Word_inner of int (* iw *)
  | WORD_include of int (* aW *)
  | WORD_inner of int (* iW *)
  | Sentence_include of int (* as *)
  | Sentence_inner of int (* is *)
  | Paragraph_include of int (* ap *)
  | Paragraph_inner of int (* ip *)

type t=
  | Insert of insert * int
  | Motion of motion * int
  | Delete of motion * int
  | Change of motion * int
  | Undo of int
  | Paste of int
  | ChangeMode of Mode.Name.t