Thread View: vmsnet.tpu
2 messages
2 total messages
Started by acs_mn
Wed, 27 Jan 1993 17:50
Anyway to have Eve act like a simple WYSIWYG editor?
Author: acs_mn
Date: Wed, 27 Jan 1993 17:50
Date: Wed, 27 Jan 1993 17:50
29 lines
1948 bytes
1948 bytes
I was wondering if anyone has written anything in TPU as an extension to
Eve which would make Eve act like a very basic WYSIWYG editor?
I have an application program which will display text files and this
program understands basic VTxxx escape sequences to do such things as bold,
underline, etc. Right now, it is somewhat painful to create these files since
the person creating the file must insert the various escape sequences
manually. I have considered defining keys that insert the right codes - and
this would definitely be better - but what I really would like is to have Eve
interpret the code and show the word in reverse video, etc. Right now, the
person has to save their file, get out of Eve and run the application program
to display the file just to figure out if they have all the bold codes, etc.
correct. It would be so much nicer to have Eve do this.
I did a little experimentation with the SET(TEXT,window,NO_TRANSLATE)
option and this does allow Eve to show the video attributes but then editing
the text lines containing the escape sequences is difficult because the cursor
movement and the text on the screen aren't in sync.
Software version info: VMS 5.5-2 with VAXTPU V2.6.
Has anybody attempted to do something like this using TPU? Any and all
ideas appreciated. Thanks.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Marlys A. Nelson System Manager, Systems Programmer,
Academic Computing Network Manager, etc., etc.
Univ. of WI - River Falls
Internet: Marlys.A.Nelson@uwrf.edu
Re: Anyway to have Eve act like a simple WYSIWYG editor?
Author: "John E. Davis"
Date: Thu, 28 Jan 1993 07:15
Date: Thu, 28 Jan 1993 07:15
59 lines
3149 bytes
3149 bytes
In article <1993Jan27.160525.1@slacvx.slac.stanford.edu>
fairfield@slacvx.slac.stanford.edu writes:
I've done it (editing these things, that is), but nothing
special is required. Just use EVE and split the screen into two
windows. Set one to NO_TRANSLATE and edit in the other. The
NO_TRANSLATE window gives you a "real-time" picture of your edits
while the normal, BLANK_TABS window keeps the editing point in sync
with the cursor.
Although I have no reason to doubt that the above is true, I find it hard to
believe that it works well. Suppose I insert an escape char into the buffer
in the manner described above. Then in the ``editing'' window, I will see a
displayable representation for the character, e.g., as ^[. Then I would
suppose that the editor would move to the apporpriate row and column on the
terminal where the escape is to be ``displayed'' (in the other window) and
output it at that point without translation. The the editor should move the
terminal cursor back to the editing window. So, a simple insert of an escape
char in row 1 column 1 would result in the following sent to the terminal:
^[[1;1H (position cursor at 1,1
^ [ (output two char displayable sequence )
^[13;1H (goto row 13,1 of second window)
^[ (literal escape character)
^[[1;3H (move cursor to next position and wait for more user input)
The point is, the terminal will see an escape two back to back escapes and
will not know what to do with it and leave the cursor at 13,1.
Of course, I am making alot of assumptions about how I think the editor works
so the above scenario may be totally wrong.
Instead, I would define strings like
@b bold
@r reverse video
@n normal video
@u underline
@l blink
etc...
Then my file would look like:
This is @bbold text@n and this is @lblinking text@n etc....
Then I would simply do a replace: @b --> ^[[5m, etc....
Of course this still presents a problem with formatting, etc, but I at least
it is more readable.
--
_____________
#___/John E. Davis\_________________________________________________________
#
# internet: davis@amy.tch.harvard.edu
# bitnet: davis@ohstpy
# office: 617-735-6746
#
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads