Subject: | |
From: | |
Reply To: | |
Date: | Wed, 23 Aug 1995 20:53:28 GMT |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Guy Smith ([log in to unmask]) wrote:
: vi needs a general overhaul. When I installed 5.0, I renamed the CSL vi
: (stevie) back to it's original name and PATHed in HP's vi. I'm surprised
: that our programmers allowed me to escape the building alive. The woes
: are numerous, but for me the major defect is it's inablility to handle
: any screen format aside from 80X24. I tend to keep Reflection in 132X40,
: which Qedit handles well with a single SET command. I can find nothing
: under vi's :set that makes it behave in this environment.
From the shell:
$#term is already defined.
$export LINES=40
$export COLUMNS=132
$vi foo
From the CI:
:setvar term "hp2392a"
:setvar lines 40
:setvar columns 132
:run vi.hpbin.sys;info="foo"
These variables are picked up by vi on entry to determine the screen size.
The default is 80x24, but it _can_ be changed.
We have a script file that the CI can execute to determine the screen size
and set these variables:
option nolist
if hpjobtype = 'J' then
return
endif
SETVAR _cur_pos "NOPE"
INPUT _cur_pos,![chr(27)+"`"],5
IF '!_cur_pos' = "NOPE" THEN
ECHO Can not read your current cursor position.
ELSE
COMMENT Now read the window size.
SETVAR _win_size "NOPE"
INPUT _win_size,![chr(27)+"&a999c999Y"+chr(27)+"A"+chr(27)+"`"],5
IF '!_win_size' = "NOPE" THEN
ECHO Can not read your window size.
ELSE
SETVAR _win_row "![str('!_win_size',8,3)]"
SETVAR _win_row "![!_win_row+2]"
SETVAR _win_col "![str('!_win_size',4,3)]"
SETVAR _win_col "![!_win_col+1]"
ENDIF
ECHO !_cur_pos![chr(27)+"A"]
SETVAR lines "!_win_row"
SETVAR columns "!_win_col"
DELETEVAR _win_size
DELETEVAR _win_row
DELETEVAR _win_col
DELETEVAR _cur_pos
SHOWVAR lines
SHOWVAR columns
ENDIF
The shell version is left as an exercise for the interested reader :)
: And, if I may be so bold:
: 24) Fix the shell. It is slow and mangles keystrokes when PC type-ahead is
: enabled.
Did you:
setvar hptypeahead true
before entering the shell? I think that helps but I'm not sure about this
particular case.
: 25) As many other have noted, more(1) should not clear the screen when
: called.
I think there's an SR for this already.
: 26) HP should included some non-POSIX extentions found in HP-UX so
: mixed platform HP shops have a more unified environment (ll comes to mind).
You can easily do this for yourself by adding to /etc/profile or to your
local profile:
alias -x ll="ls -l"
Steve
|
|
|