PVIC 1.0a ========= PVIC is a Portable VI Clone derived from STEVIE 3.69B. It has been written in Kernighan and Ritchie C, so it compiles on both old and modern C compilers. The original STEVIE 3.69B I got was written for MS-DOS systems, and did contain many non portable things like BIOS calls. I have removed everything from STEVIE 3.69B I considered non-portable, and I did rewrite the I/O. I added code to read termcap files. I gave many variables and functions from the original STEVIE 3.69B more understandable names. There are some incompatibilities between different operating systems. These incompatibilities are resolved in the files LOCDEFS.H and LOCFUNCS.H. To port PVIC to another operating system, you only have to modify these files. The code provided is for OS-9. I hope PVIC will provide for those who have to work on many different platforms, and want to use the same editor on every platform. I encourage everybody to copy and/or port PVIC. Frits Wiarda Boul.Heuvelink 1-5 6828 KG Arnhem Holland e-mail fwiarda@compuserve.com ENVIRONMENT =========== Installing PVIC --------------- The 'vi' executable must be installed in the execution directory or in a directory on the search path. Running PVIC ============ Usage: vi [file ...] vi -t tag vi +[num] file vi +/pat file Environment variables affecting PVIC ------------------------------------ Variable Description EXINIT If defined, this must contain a colon command that will be executed during initialisation, e.g., 'set eb ts=4' LINES The number of lines on the terminal SHELL If present, identifies the shell used for :sh, :! and ! commands. If absent it defaults to the standard shell for your operating system. For OS-9 this is the Microware shell, 'shell'. TERM Contains the termcap terminal name of the current terminal TERMCAP If set, must contain either: - the full pathname of the termcap database. - the termcap entry for the current terminal. This gives the fastest startup. If $TERMCAP is not set the termcap database must be in the usual default place for your operating system (/dd/SYS/termcap for OS-9). The terminal type defaults to ANSI if $TERM is unset; in this case $TERMCAP will be ignored and key assignments will suit a PC. In other words, PVIC will work on a PC without and environment variables set provided that the ANSI.SYS driver is installed. If the terminal is other than an ANSI type then $TERM must contain the termcap name of your terminal. The other variables are not required. Environment variables may be used anywhere in a colon shell or file i/o command and will be expanded where they can be found. If they cannot be matched an error will be signalled. Files ----- /dd/sys/termcap - the termcap database $HOME/.exrc - contains initialisation commands. Settings in this file override termcap settings and are in turn overridden by $EXINIT and $LINES. VI editor options supported by PVIC ----------------------------------- Option Abbreviation Default Description lines lines 24 lines on the screen report report 5 min report line count (e.g. yanked lines) scroll scroll 12 scroll size for half-screen scrolling tabsize ts 8 tab size (chars). In OS/9 the tab size defaults to the value in the terminal descriptor. autoindent ai no auto-indent mode flag backup bk no make backups when files are written errorbell eb no beep when an invalid key is hit ignorecase ic no ignore case in searches list list no shows graphic tabs and newlines modelines ml yes enable mode line processing. Modelines are lines of the form ex:colon-command in a file that is being edited number nu no show line numbers showmatch sm no show matching []{}() showmode mo yes show edit mode vbell vb no visual bell wrapscan ws yes search wraps round buffer Termcap capabilities used by PVIC --------------------------------- Capability Tag Rqd Default Description clear_screen cl Y \E[2J Erase display (may optionally home cursor). clear_to_eol ce Y \E[K Erase the entire current line. cursor_motion cm Y \E[%i%d;%dH Cursor motion string. lines li 24 Lines on screen columns co 80 Columns on screen init_terminal ti Initialise terminal deinit_terminal te Restore original terminal operation save_cursor sc \E[s Save the cursor position. restore_cursor rc \E[u Restore the cursor position. cursor_invisible vi Invisible cursor (very optional). cursor_visible vs Visible cursor (very optional). bell bl \007 Audible bell. key_f1 k0 \EOP F1 key key_f2 k1 \EOQ F2 key key_ic kI Insert key_dc kD Delete key_home kh Go to first non-space char on line key_eol kE Go to end of line key_ppage kP Page up key_npage kN Page down key_up ku \E[A Cursor up key_down kd \E[B Cursor down key_left kl \E[D Cursor left key_right kr \E[C Cursor right key_backspace kb \010 Backspace