github.com/aretext/aretext@v1.3.0/docs/command-reference.md (about)

     1  Command Reference
     2  =================
     3  
     4  This document lists every command in aretext.
     5  
     6  All commands are compatible with vim keybindings, but not all vim keybindings are implemented. If you want to use a command that is not yet available, please consider contributing to the project!
     7  
     8  Normal Mode Commands
     9  --------------------
    10  
    11  Some commands may be prefixed with a number *count* to repeat the command *count* times. For example "5x" deletes the next five characters.
    12  
    13  Commands that interact with the clipboard accept a *clipboard page* prefix of the form `"[a-z]`, where the letter is the name of the page. If not provided, a default (unnamed) page is used.
    14  
    15  | Name                                                            | Key Binding               | Options               |
    16  |-----------------------------------------------------------------|---------------------------|-----------------------|
    17  | cursor left                                                     | left arrow                | count                 |
    18  | cursor right                                                    | right arrow               | count                 |
    19  | cursor up                                                       | up arrow                  | count                 |
    20  | cursor down                                                     | down arrow                | count                 |
    21  | cursor left                                                     | h                         | count                 |
    22  | cursor right                                                    | l                         | count                 |
    23  | cursor up                                                       | k                         | count                 |
    24  | cursor down                                                     | j                         | count                 |
    25  | cursor forward                                                  | space                     | count                 |
    26  | cursor back                                                     | backspace                 | count                 |
    27  | cursor start of next line after indentation                     | enter                     |                       |
    28  | cursor to next matching character in line                       | f\{char\}                 | count                 |
    29  | cursor to prev matching character in line                       | F\{char\}                 | count                 |
    30  | cursor till next matching character in line                     | t\{char\}                 | count                 |
    31  | cursor till prev matching character in line                     | T\{char\}                 | count                 |
    32  | cursor next word start                                          | w                         | count                 |
    33  | cursor next word start, including punctuation                   | W                         | count                 |
    34  | cursor prev word start                                          | b                         | count                 |
    35  | cursor prev word start, including punctuation                   | B                         | count                 |
    36  | cursor next word end                                            | e                         | count                 |
    37  | cursor next word end, including punctuation                     | E                         | count                 |
    38  | cursor prev paragraph                                           | \{                        |                       |
    39  | cursor next paragraph                                           | \}                        |                       |
    40  | cursor line start                                               | 0                         |                       |
    41  | cursor line start after indentation                             | ^                         |                       |
    42  | cursor line end                                                 | $                         |                       |
    43  | cursor start of first line                                      | gg                        |                       |
    44  | cursor start of line number                                     | \{count\}gg               |                       |
    45  | cursor start of last line                                       | G                         |                       |
    46  | cursor matching code block delimiter (paren, brace, or bracket) | %                         |                       |
    47  | cursor prev unmatched open brace                                | [{                        |                       |
    48  | cursor next unmatched close brace                               | ]}                        |                       |
    49  | cursor prev unmatched open paren                                | [(                        |                       |
    50  | cursor next unmatched close paren                               | ])                        |                       |
    51  | scroll up (full page)                                           | ctrl-f                    |                       |
    52  | scroll down (full page)                                         | ctrl-b                    |                       |
    53  | scroll up (half page)                                           | ctrl-u                    |                       |
    54  | scroll down (half page)                                         | ctrl-d                    |                       |
    55  | insert                                                          | i                         |                       |
    56  | insert at start of line                                         | I                         |                       |
    57  | append                                                          | a                         |                       |
    58  | append at end of line                                           | A                         |                       |
    59  | new line below                                                  | o                         |                       |
    60  | new line above                                                  | O                         |                       |
    61  | join lines                                                      | J                         |                       |
    62  | delete next character in line                                   | x                         | count, clipboard page |
    63  | delete next character in line                                   | delete                    |                       |
    64  | delete line                                                     | dd                        | count, clipboard page |
    65  | delete previous character in line                               | dh                        | clipboard page        |
    66  | delete lines below                                              | dj                        | clipboard page        |
    67  | delete lines above                                              | dk                        | clipboard page        |
    68  | delete next character in line                                   | dl                        | count, clipboard page |
    69  | delete to end of line                                           | d$                        | clipboard page        |
    70  | delete to start of line                                         | d0                        | clipboard page        |
    71  | delete to start of line after indentation                       | d^                        | clipboard page        |
    72  | delete to end of line                                           | D                         | clipboard page        |
    73  | delete to start of next word                                    | dw                        | count, clipboard page |
    74  | delete to start of next word, including punctuation             | dW                        | count, clipboard page |
    75  | delete a word                                                   | daw                       | count, clipboard page |
    76  | delete inner word                                               | diw                       | count, clipboard page |
    77  | delete a double-quoted string                                   | da"                       | clipboard page        |
    78  | delete inner double-quoted string                               | di"                       | clipboard page        |
    79  | delete a single-quoted string                                   | da'                       | clipboard page        |
    80  | delete inner single-quoted string                               | di'                       | clipboard page        |
    81  | delete a backtick-quoted string                                 | da\`                      | clipboard page        |
    82  | delete inner backtick-quoted string                             | di\`                      | clipboard page        |
    83  | delete to next matching character in line                       | df\{char\}                | count, clipboard page |
    84  | delete to prev matching character in line                       | dF\{char\}                | count, clipboard page |
    85  | delete till next matching character in line                     | dt\{char\}                | count, clipboard page |
    86  | delete till prev matching character in line                     | dT\{char\}                | count, clipboard page |
    87  | delete inner paren block                                        | dib <br/> di\( <br/> di\) | clipboard page        |
    88  | delete a paren block                                            | dab <br/> da\( <br/> da\) | clipboard page        |
    89  | delete inner brace block                                        | diB <br/> di\{ <br/> di\} | clipboard page        |
    90  | delete a brace block                                            | daB <br/> da\{ <br/> da\} | clipboard page        |
    91  | delete inner angle block                                        | di&lt; <br/> di&gt;       | clipboard page        |
    92  | delete an angle block                                           | da&lt; <br/> da&gt;       | clipboard page        |
    93  | search forward and delete                                       | d/                        | clipboard page        |
    94  | search backward and delete                                      | d?                        | clipboard page        |
    95  | change word                                                     | cw                        | count, clipboard page |
    96  | change a word                                                   | caw                       | count, clipboard page |
    97  | change inner word                                               | ciw                       | count, clipboard page |
    98  | change a double-quoted string                                   | ca"                       | clipboard page        |
    99  | change inner double-quoted string                               | ci"                       | clipboard page        |
   100  | change a single-quoted string                                   | ca'                       | clipboard page        |
   101  | change inner single-quoted string                               | ci'                       | clipboard page        |
   102  | change a backtick-quoted string                                 | ca\`                      | clipboard page        |
   103  | change inner backtick-quoted string                             | ci\`                      | clipboard page        |
   104  | change to next matching character in line                       | cf\{char\}                | count, clipboard page |
   105  | change to prev matching character in line                       | cF\{char\}                | count, clipboard page |
   106  | change till next matching character in line                     | ct\{char\}                | count, clipboard page |
   107  | change till prev matching character in line                     | cT\{char\}                | count, clipboard page |
   108  | change inner paren block                                        | cib <br/> ci\( <br/> ci\) | clipboard page        |
   109  | change a paren block                                            | cab <br/> ca\( <br/> ca\) | clipboard page        |
   110  | change inner brace block                                        | ciB <br/> ci\{ <br/> ci\} | clipboard page        |
   111  | change a brace block                                            | caB <br/> ca\{ <br/> ca\} | clipboard page        |
   112  | change inner angle block                                        | ci&lt; <br/> ci&gt;       | clipboard page        |
   113  | change an angle block                                           | ca&lt; <br/> ca&gt;       | clipboard page        |
   114  | search forward and change                                       | c/                        | clipboard page        |
   115  | search backward and change                                      | c?                        | clipboard page        |
   116  | replace character                                               | r                         |                       |
   117  | toggle case                                                     | ~                         |                       |
   118  | indent line                                                     | &gt;&gt;                  |                       |
   119  | outdent line                                                    | &lt;&lt;                  |                       |
   120  | yank to start of next word                                      | yw                        | count, clipboard page |
   121  | yank to start of next word, including punctuation               | yW                        | count, clipboard page |
   122  | yank a word                                                     | yaw                       | count, clipboard page |
   123  | yank inner word                                                 | yiw                       | count, clipboard page |
   124  | yank a double-quoted string                                     | ya"                       | clipboard page        |
   125  | yank inner double-quoted string                                 | yi"                       | clipboard page        |
   126  | yank a single-quoted string                                     | ya'                       | clipboard page        |
   127  | yank inner single-quoted string                                 | yi'                       | clipboard page        |
   128  | yank a backtick-quoted string                                   | ya\`                      | clipboard page        |
   129  | yank inner backtick-quoted string                               | yi\`                      | clipboard page        |
   130  | yank line                                                       | yy                        | clipboard page        |
   131  | yank to next matching character in line                         | yf\{char\}                | count, clipboard page |
   132  | yank to prev matching character in line                         | yF\{char\}                | count, clipboard page |
   133  | yank till next matching character in line                       | yt\{char\}                | count, clipboard page |
   134  | yank till prev matching character in line                       | yT\{char\}                | count, clipboard page |
   135  | search forward and yank                                         | y/                        | clipboard page        |
   136  | search backward and yank                                        | y?                        | clipboard page        |
   137  | put after cursor                                                | p                         | clipboard page        |
   138  | put before cursor                                               | P                         | clipboard page        |
   139  | show command menu                                               | :                         |                       |
   140  | start forward search                                            | /                         |                       |
   141  | start backward search                                           | ?                         |                       |
   142  | find next match                                                 | n                         |                       |
   143  | find previous match                                             | N                         |                       |
   144  | search forward for word under cursor                            | \*                        | count                 |
   145  | search backward for word under cursor                           | \#                        | count                 |
   146  | undo                                                            | u                         |                       |
   147  | redo                                                            | ctrl-r                    |                       |
   148  | visual mode charwise                                            | v                         |                       |
   149  | visual mode linewise                                            | V                         |                       |
   150  | repeat last action                                              | .                         |                       |
   151  
   152  Visual Mode Commands
   153  --------------------
   154  
   155  | Name                                | Key Binding            | Options        |
   156  |-------------------------------------|------------------------|----------------|
   157  | toggle visual mode charwise         | v                      |                |
   158  | toggle visual mode linewise         | V                      |                |
   159  | return to normal mode               | escape                 |                |
   160  | show command menu                   | :                      |                |
   161  | delete selection                    | x                      | clipboard page |
   162  | delete selection                    | d                      | clipboard page |
   163  | delete selection                    | delete                 |                |
   164  | change selection                    | c                      | clipboard page |
   165  | toggle case for selection           | ~                      |                |
   166  | indent selection                    | &gt;                   |                |
   167  | outdent selection                   | &lt;                   |                |
   168  | yank selection                      | y                      | clipboard page |
   169  | select inner word                   | iw                     | count          |
   170  | select a word                       | aw                     | count          |
   171  | select a double-quoted string       | a"                     |                |
   172  | select inner double-quoted string   | i"                     |                |
   173  | select a single-quoted string       | a'                     |                |
   174  | select inner single-quoted string   | i'                     |                |
   175  | select a backtick-quoted string     | a\`                    |                |
   176  | select inner backtick-quoted string | i\`                    |                |
   177  | select inner paren block            | ib <br/> i\( <br/> i\) |                |
   178  | select a paren block                | ab <br/> a\( <br/> a\) |                |
   179  | select inner brace block            | iB <br/> i\{ <br/> i\} |                |
   180  | select a brace block                | aB <br/> a\{ <br/> a\} |                |
   181  | select inner angle block            | i&lt; <br/> i&gt;      |                |
   182  | select an angle block               | a&lt; <br/> a&gt;      |                |
   183  
   184  Menu Commands
   185  -------------
   186  
   187  | Name                         | Aliases   |
   188  |------------------------------|-----------|
   189  | quit                         | q         |
   190  | force quit                   | q!        |
   191  | new document                 |           |
   192  | move or rename document      |           |
   193  | save document                | s, w      |
   194  | save document and quit       | sq, wq, x |
   195  | force save document          | s!, w!    |
   196  | force save document and quit | sq!, wq!  |
   197  | force reload                 | r!        |
   198  | find and open                | f         |
   199  | open previous document       | p         |
   200  | open next document           | n         |
   201  | child directory              | cd        |
   202  | parent directory             | pd        |
   203  | toggle show tabs             | ta        |
   204  | toggle tab expand            | te        |
   205  | toggle line numbers          | nu        |
   206  | toggle auto-indent           | ai        |
   207  | start/stop recording macro   | m         |
   208  | replay macro                 | r         |