vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

view.rst

(1843B)


      1 View
      2 ====
      3 
      4 Provides a viewport of a text instance and mangages selections.
      5 
      6 Lifecycle
      7 ---------
      8 
      9 .. doxygengroup:: view_life
     10    :content-only:
     11 
     12 Viewport
     13 --------
     14 
     15 The cursor of the primary selection is always visible.
     16 
     17 .. doxygengroup:: view_viewport
     18    :content-only:
     19 
     20 Dimension
     21 ---------
     22 
     23 .. doxygengroup:: view_size
     24    :content-only:
     25 
     26 Draw
     27 ----
     28 
     29 .. doxygengroup:: view_draw
     30    :content-only:
     31 
     32 Selections
     33 ----------
     34 
     35 A selection is a non-empty, directed range with two endpoints called *cursor*
     36 and *anchor*. A selection can be anchored in which case the anchor remains
     37 fixed while only the position of the cursor is adjusted. For non-anchored
     38 selections both endpoints are updated. A singleton selection
     39 covers one character on which both cursor and anchor reside. There always
     40 exists a primary selection which remains visible (i.e. changes to its position
     41 will adjust the viewport).
     42 
     43 Creation and Destruction
     44 ~~~~~~~~~~~~~~~~~~~~~~~~
     45 
     46 .. doxygengroup:: view_selnew
     47    :content-only:
     48 
     49 Navigation
     50 ~~~~~~~~~~
     51 
     52 .. doxygengroup:: view_navigate
     53    :content-only:
     54 
     55 Cover
     56 ~~~~~
     57 
     58 .. doxygengroup:: view_cover
     59    :content-only:
     60 
     61 Anchor
     62 ~~~~~~
     63 
     64 .. doxygengroup:: view_anchor
     65    :content-only:
     66 
     67 Cursor
     68 ~~~~~~
     69 
     70 Selection endpoint to which cursor motions apply.
     71 
     72 Properties
     73 ^^^^^^^^^^
     74 
     75 .. doxygengroup:: view_props
     76    :content-only:
     77 
     78 Placement
     79 ^^^^^^^^^
     80 
     81 .. doxygengroup:: view_place
     82    :content-only:
     83 
     84 Motions
     85 ^^^^^^^^
     86 
     87 These functions perform motions based on the current selection cursor position.
     88 
     89 .. doxygengroup:: view_motions
     90    :content-only:
     91 
     92 Primary Selection
     93 ~~~~~~~~~~~~~~~~~
     94 
     95 These are convenience function which operate on the primary selection.
     96 
     97 .. doxygengroup:: view_primary
     98    :content-only:
     99 
    100 Save and Restore
    101 ~~~~~~~~~~~~~~~~
    102 
    103 .. doxygengroup:: view_save
    104    :content-only:
    105 
    106 Style
    107 -----
    108 
    109 .. doxygengroup:: view_style
    110    :content-only: