VE: 'g' becomes 'G' and 'g' selects line

This commit is contained in:
Virgil Dupras 2020-07-04 07:40:12 -04:00
parent c2b507eaff
commit 2111f694f6
3 changed files with 4 additions and 3 deletions

View File

@ -7,7 +7,7 @@ keystrokes described below. The modifier starts at zero, but
most commands interpret a zero as a 1 so that they can have an most commands interpret a zero as a 1 so that they can have an
effect. effect.
'g' selects the block specified by the modifier as the current 'G' selects the block specified by the modifier as the current
block. Any change made to the previously selected block is block. Any change made to the previously selected block is
saved beforehand. saved beforehand.

View File

@ -1,5 +1,5 @@
'h' and 'l' move the cursor by "modifier" characters. 'j' and 'h' and 'l' move the cursor by "modifier" characters. 'j' and
'k', by lines. 'k', by lines. 'g' moves to "modifier" line.
'H' goes to the beginning of the line, 'L' to the end. 'H' goes to the beginning of the line, 'L' to the end.

View File

@ -1,4 +1,4 @@
: $g ACC @ selblk ; : $G ACC @ selblk ;
: $[ BLK> @ acc@ - selblk ; : $[ BLK> @ acc@ - selblk ;
: $] BLK> @ acc@ + selblk ; : $] BLK> @ acc@ + selblk ;
: $t PREVBLK @ selblk ; : $t PREVBLK @ selblk ;
@ -10,4 +10,5 @@
: $h -1 cmv ; : $l 1 cmv ; : $k -64 cmv ; : $j 64 cmv ; : $h -1 cmv ; : $l 1 cmv ; : $k -64 cmv ; : $j 64 cmv ;
: $H EDPOS @ 0x3c0 AND pos! ; : $H EDPOS @ 0x3c0 AND pos! ;
: $L EDPOS @ 0x3f OR pos! ; : $L EDPOS @ 0x3f OR pos! ;
: $g ACC @ 1 MAX 1- 64 * pos! ;
: $@ BLK> @ BLK@* @ EXECUTE 0 BLKDTY ! contents ; : $@ BLK> @ BLK@* @ EXECUTE 0 BLKDTY ! contents ;