github.com/aretext/aretext@v1.3.0/docs/navigation.md (about)

     1  Navigation
     2  ==========
     3  
     4  This guide explains how to navigate efficiently within a document. It assumes you know how to start the editor and switch between normal/insert mode (if not, please read the [Quickstart](quickstart.md) first).
     5  
     6  Scrolling
     7  ---------
     8  
     9  To scroll up by half a screen, press Ctrl-u ("up") in normal mode.
    10  
    11  To scroll down by half a screen, press Ctrl-d ("down") in normal mode.
    12  
    13  Line movement
    14  -------------
    15  
    16  To move the cursor to the last line, type "G" in normal mode.
    17  
    18  To move the cursor to the first line, type "gg" in normal mode.
    19  
    20  To move the cursor to a specific line number, type "<number>gg" in normal mode. For example, "123gg" moves the cursor to the start of line 123.
    21  
    22  To move the cursor to the start of the current line (after any indentation), use "^". Use "0" to move to the start of the current line *before* any indentation.
    23  
    24  To move the cursor to the end of the current line, type "$" in normal mode.
    25  
    26  Next or previous matching character
    27  -----------------------------------
    28  
    29  To move the cursor forward to the next matching character on a line, type "f\{char\}" in normal mode, where "\{char\}" is the character to match. To move the cursor up to, but not on, that character use "t\{char\}".
    30  
    31  Similarly, to move the cursor backwards to a matching char, use "F\{char\}" and "T\{char\}".
    32  
    33  Word movement
    34  -------------
    35  
    36  A "word" in aretext is a sequence of characters separated by whitespace or punctuation. To move the cursor forward to the next word, press "w" in normal mode. Use "e" to move the cursor to the *end* of the current word, and "b" to move the cursor *back* to the start of the previous word.
    37  
    38  Paragraph movement
    39  ------------------
    40  
    41  A "paragraph" in aretext is a contiguous sequence of non-empty lines. To move the cursor to the next paragraph, type "}" in normal mode; to move to the previous paragraph, type "{".
    42  
    43  Text search
    44  -----------
    45  
    46  Aretext supports forward and backward text search within a document.
    47  
    48  To search forward, type "/" in normal mode, then type your search query. To move the cursor to the search result, press enter; to abort the search, press escape.
    49  
    50  To search backward, type "?" in normal mode, then type your search query.
    51  
    52  To repeat a search, type "n" in normal mode (this moves the cursor to the "next" result). To move the cursor back to the previous result, type "N" in normal mode.
    53  
    54  If the search contains at least one uppercase letter, then it is case-sensitive; otherwise, it is case-insensitive (this is equivalent to vim's "smartcase" mode). You can override this by adding a suffix "\c" to force case-insensitive search and "\C" to force case-sensitive search. For example:
    55  
    56  | case-insensitive | case-sensitive |
    57  |------------------|----------------|
    58  | "abc"            | "Abc"          |
    59  | "Abc\c"          | "abc\C"        |
    60  
    61  To search for the word under the cursor, use "*" to search forward and "#" to search backwards. Word searches are always case-sensitive.
    62  
    63  Matching braces and parentheses
    64  -------------------------------
    65  
    66  Many programming languages use curly braces `{...}` and parentheses `(...)` to mark the beginning and end of a code block.
    67  
    68  For matching braces, use "\[{" to jump to the previous unmatched open brace and "]}" for the next unmatched close brace. The commands "\[(" and "])" work similarly for parentheses.
    69  
    70  If the cursor is on a curly brace, parenthesis, or square bracket, use "%" to jump to its match.