Subject: | |
From: | |
Reply To: | |
Date: | Tue, 19 Sep 1995 01:27:56 GMT |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
I guess this is somewhat irrelevant since you guys are talking about
HELP and PRINT, but I couldn't help noticing a colleague of mine using
RESIZE-command on MPE before entering VI... sure got my attention.
Of course, vi understands the two CI-variables LINES and COLUMNS that
help and print do not... anyway, here's a sample of what happened:
:showvar
TERM = HP2392.UNIX.SYS
:
...now resizing my window...
:resize
LINES = 37
COLUMNS = 93
...and here's what the command was doing:
====================================================
:help resize
USER DEFINED COMMAND FILE: RESIZE
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]"
SETVAR lines "!_win_row"
SETVAR columns "!_win_col"
DELETEVAR _win_size
DELETEVAR _win_row
DELETEVAR _win_col
SHOWVAR lines
SHOWVAR columns
ENDIF
ECHO !_cur_pos![chr(27)+"A"]
DELETEVAR _cur_pos
ENDIF
=====================================================
Cheers,
:-) Eero Laurila - HP CSY Networking lab.
|
|
|