Then, I tried vim. It was worse than elvis at recognizing this configuration.
It not only displayed the file on the console, but it insisted on taking
commands from the keyboard. Vim didn't seem to recognize any aspect of the
CTTY command, while elvis at least "knew" enough to take keyboard input over
the serial port.
Surely there must be some command-line option or environment variable setting
that will do the trick, but I can't find it. I have searched the FAQs for this
newsgroup, and the help files for vim and elvis. (My wife often accuses me of
being blind as a bat, so it's entirely likely that I read right over it an
missed it!) Any help would be appreciated.
-Chris Lott
rcl...@ro.com
I wonder which version of elvis and vim you tried.
I have never used "CTTY COM1" - could you describe how this is done?
Maybe some other folks can then try it do and give you some feedback.
> It not only displayed the file on the console, but it insisted on taking
> commands from the keyboard. Vim didn't seem to recognize any aspect of the
> CTTY command, while elvis at least "knew" enough to take keyboard input over
> the serial port.
Another item for the vim wishlist?
Let me know!
Sven
>I wonder which version of elvis and vim you tried.
Elvis version 1.7
VIM version ??? dated 26 Apr 97
>I have never used "CTTY COM1" - could you describe how this is done?
>Maybe some other folks can then try it do and give you some feedback.
Well, it's done like this. You type (not the prompt, of course):
C:\> CTTY COM1
from the DOS prompt. From then on, the command processor (command.com)
will send and accept commands from the specified device, in this case
the serial port on COM1. Many graphical-type programs, which write
directly to the Video RAM, won't work this way, of course. But I see
no reason why the vi-clones shouldn't work this way. Short of having
vi working, the only editor I know of that will work over the serial
port in this manner is EDLIN!
Any suggestions are welcome...
-Chris Lott
rcl...@ro.com
Test with command ":version". According to the date this could be vim-5.0f.
Anyway, I suggest to get the release version, ie vim-5.0 [980219].
> it's done like this. You type "CTTY COM1" from the DOS prompt. From then on,
> the command processor (command.com) will send and accept commands from the
> specified device, in this case the serial port on COM1. [...]
> I see no reason why the vi-clones shouldn't work this way.
Maybe the info about the connected terminal cannot be obtained that way?
Perhaps vim would work with "+builtin_terms"?
Why do you do this again?
I can imagine that might want to do this to some PC
if I didn't want to connect a monitor to it and yet
edit some files. But then I'd have to enter the
command "CTTY COM1" without being sure that a shell,
err, command.com, will accept it.
Sven
What are you using as your terminal display through the serial port?
A DEC VT100? A WYSE terminal?
Most DOS versions of "vi" do not include a full blown terminal
capabilities database. But most have been designed to work with one
if one is available. Find the appropriate termcap/terminfo entry for
your terminal, install it someplace where your DOS "vi" can find it,
set your TERM variable appropriately, and you should be golden.
--
James C. Hu <j...@cs.wustl.edu> Computer Science Doctoral Candidate
http://www.cs.wustl.edu/~jxh/ Washington University in Saint Louis
>>>>>>>>>>>>> I use *SpamBeGone* <URL:http://www.internz.com/SpamBeGone/>
Check the :set term options - that should be it. Try :set term=vt100
for starters...
Louis
>Most DOS versions of "vi" do not include a full blown terminal
>capabilities database. But most have been designed to work with one
>if one is available. Find the appropriate termcap/terminfo entry for
>your terminal, install it someplace where your DOS "vi" can find it,
>set your TERM variable appropriately, and you should be golden.
My problem wasn't that the program wasn't speaking the correct codes
for my terminal, but rather it wasn't using the appropriate BIOS
commands to receive/send keyboard/screen I/O. These BIOS commands
know when to redirect their input/output to the serial port when the
CTTY command is issued. But you are on the right track when you recommend
the TERM variable - that turned out to be the trick!
Under Elvis, if the TERM variable isn't set, the program bypasses the
BIOS and writes directly to the screen. When I set TERM to something,
say ANSI, elvis uses the BIOS calls and the I/O is appropriately
re-directed! It works!
Alas, I haven't been able to get vim to do the same thing. Setting
the TERM variable got it to route the screen output over the serial
port, but it was intent on getting keyboard input from the console.
I couldn't figure out how to get vim to accept commands over the
serial port.
Another poster has suggested/inquired about calvin. I haven't known
about this editor, but it sounds interesting enough for my application
(palmtop computer with limited memory) that I'll try to find it on the
internet and give it a try.
Thanks for all the comments and help.
-Chris Lott