Re: Block editor experiment
  Home FAQ Contact Sign in
comp.lang.forth only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Block editor experiment         

Group: comp.lang.forth · Group Profile
Author: Jean-François Michaud
Date: May 23, 2007 05:08

Update on the experiment :). It seems to be very efficient so far.
Code edit speed has increased many folds.

I included a few new functionalities to further the idea of ease of
work with the editor/buffers. So far I have:

n [1,8]

2 512 buffers. Each block of source is 64 characters on 8 lines of
text. Each buffer on screen is numbered 1 through 8 for single digit
convenience.

This is the screen output:

Block: 1
----------------------------------------------
1- blah text
2- blah blah text
3- blah blah blah text
4- yay text
5- yay yay text
6- yay yay yay text
7- super text
8- super text
----------------------------------------------
Block: 5
----------------------------------------------
1- Skipjack
2- Snap
3- Serendipity
4- Slick
5- Senseless
6- Snore
7- Select
8- Sum
----------------------------------------------

These are the allowed commands (each of these operate immediately,
including 1 through 8):

9 -- Select the primary buffer (top buffer)
0 -- Select the secondary buffer (bottom buffer)
L ( n1 n2 -- ) -- Swaps n1 and n2 in the current buffer
D ( n1 -- ) -- Deletes line n1
C ( n1 -- ) -- Copies n1 in the temporary line buffer
P ( n1 -- ) -- Pastes temporay line buffer onto line n1
R -- Refresh the buffers with original data
as read from blocks of source
right arrow -- Circulates forward through blocks
If secondary block is 2, primary becomes
2 and secondary becomes 3
left arrow -- Circulates backwards through blocks
If primary block is 2, secondary becomes
2 and primary becomes 1
Space bar -- Clear currently selected buffer/block
Backspace ( n -- ) -- Drop a stack parameter

Thats it for now. All commands are protected so that accidentally
pressing them won't cause the editor to crash (stack underflow).
Nothing happens if there are not enough arguments to grab. I still
need to implement write capabilities (tied to 'E' probably for edit)
and there will be a way to save the currently selected buffer back to
disk very quickly also (probably through 'S' for save).

Regards
Jean-Francois Michaud
no comments
diggit! del.icio.us! reddit!