Skip to content

Commit

Permalink
add anchored movement commands
Browse files Browse the repository at this point in the history
Commands added:
* `move_anchored_line_up`
* `move_anchored_line_down`
* `move_anchored_visual_line_up`
* `move_anchored_visual_line_down`
* `extend_anchored_line_up`
* `extend_anchored_line_down`
* `extend_anchored_visual_line_up`
* `extend_anchored_visual_line_down`

These new commands move cursors vertically. A cursor will move depending
on its position:

* If it is on a newline character of a non-empty line, the cursor will
  stay on newlines (i.e. on a line's last character).

* If it is on a non-newline character of a non-empty line, the cursor
  will try to avoid newline characters. It will move normally, but if
  it would end up on a newline, instead it will be moved one position
  left of it (i.e. the line's second to last character).

* If it is on the newline character of an empty line (that contains
  nothing except the newline character), the cursor will continue to
  move like before: If it stayed on newline before, it will continue to
  do so. Otherwise it will try to avoid them (except on empty lines).
  • Loading branch information
pantos9000 committed May 2, 2024
1 parent 9839d17 commit e52e85f
Show file tree
Hide file tree
Showing 2 changed files with 486 additions and 2 deletions.

0 comments on commit e52e85f

Please sign in to comment.