Added files for external editor (joe)
This commit is contained in:
parent
32981a54ac
commit
1c4c68fa9a
@ -5,7 +5,7 @@ include ../Makefile.global
|
||||
|
||||
OTHER = Makefile README maint midnight weekly monthly installinit.sh rc rc.shutdown \
|
||||
mbse.start mbse.stop bbsdoor.sh rundoor.sh init.Debian init.RedHat \
|
||||
init.Slackware init.SuSE hatch
|
||||
init.Slackware init.SuSE hatch editor bbsjoerc bbsjmacsrc
|
||||
|
||||
####################################################################################################
|
||||
|
||||
|
516
script/bbsjmacsrc
Normal file
516
script/bbsjmacsrc
Normal file
@ -0,0 +1,516 @@
|
||||
$Id$
|
||||
|
||||
Initialization file for JOE
|
||||
Gnu-Emacs Joe
|
||||
|
||||
JOE looks for this file in:
|
||||
1 - .jmacsrc
|
||||
2 - $HOME/.jmacsrc
|
||||
3 - /usr/local/lib/jmacsrc
|
||||
|
||||
This file can include other files by placing the following include command
|
||||
in the first column:
|
||||
|
||||
:include filename
|
||||
|
||||
FIRST SECTION: Default global options (these options can also be specified
|
||||
on the command line. Also the NOXON, LINES, COLUMNS, DOPADDING and BAUD
|
||||
options can be specified in environment variables):
|
||||
|
||||
Put each option you want set in the first column:
|
||||
|
||||
-option Sets the option
|
||||
--option Clears the option
|
||||
|
||||
-mid Cursor is recentered when scrolling is necessary
|
||||
-marking Text between ^KB and cursor is highlighted
|
||||
-asis Characters 128 - 255 shown as-is
|
||||
-force Force final newline when files are saved
|
||||
-nobackups If you don't want backup files to be created
|
||||
-lightoff Turn off highlighting after block copy or move
|
||||
--exask ^KX always confirms file name
|
||||
-beep Beep on errors and when cursor goes past extremes
|
||||
-nosta Disable top-most status line
|
||||
-keepup %k and %c status line escape sequences updated frequently
|
||||
-pg 1 No. lines to keep for PgUp/PgDn
|
||||
-csmode ^KF after a pervious search does a ^L instead
|
||||
-backpath path Directory to store backup files
|
||||
-nonotice Disable copyright notice
|
||||
-noxon Attempt to turn off ^S/^Q processing
|
||||
-orphan Put extra files given on command line in orphaned buffers
|
||||
instead of in windows
|
||||
-dopadding Output pad characters (for when there is no tty handshaking)
|
||||
-lines nnn Set no. screen lines
|
||||
-baud nnn Set baud rate for terminal optimizations
|
||||
-columns nnn Set no. screen columns
|
||||
--help Start with help on
|
||||
-skiptop nnn Don't use top nnn lines of the screen
|
||||
|
||||
Status line definition strings. -lmsg defines the left-justified string and
|
||||
-rmsg defines the right-justified string. The first character of -rmsg is
|
||||
the background fill character. The following escape sequences can be used
|
||||
in these string:
|
||||
|
||||
%t 12 hour time
|
||||
%u 24 hour time
|
||||
%T O for overtype mode, I for insert mode
|
||||
%W W if wordwrap is enabled
|
||||
%I A if autoindent is enabled
|
||||
%X Rectangle mode indicator
|
||||
%n File name
|
||||
%m '(Modified)' if file has been changed
|
||||
%* '*' if file has been changed
|
||||
%R Read-only indicator
|
||||
%r Row (line) number
|
||||
%c Column number
|
||||
%o Byte offset into file
|
||||
%O Byte offset into file in hex
|
||||
%a Ascii value of character under cursor
|
||||
%A Ascii value of character under cursor in hex
|
||||
%k Entered prefix keys
|
||||
%p Percent of file cursor is at
|
||||
%l No. lines in file
|
||||
%S '*SHELL*' if there is a shell running in window
|
||||
%M Macro recording message
|
||||
|
||||
The formatting escape sequences may also be given:
|
||||
|
||||
\i Inverse
|
||||
\u Underline
|
||||
\b Bold
|
||||
\d Dim
|
||||
\f Blink
|
||||
|
||||
-lmsg \i%k%T%W%I%X %n %m%R %M
|
||||
-rmsg %S Row %r Col %c %t Ctrl-X H for help
|
||||
|
||||
SECOND SECTION: File name dependant local option settings:
|
||||
|
||||
Each line with '*' in the first column indicates the modes which should be
|
||||
files which match the regular expression. If more than one regular
|
||||
expression matches the file name, than the last matching one is chosen.
|
||||
|
||||
Here is a list of modes which can be set:
|
||||
|
||||
-wordwrap Wordwrap
|
||||
-autoindent Auto indent
|
||||
-overwrite Overtype mode
|
||||
-lmargin nnn Left margin
|
||||
-rmargin nnn Right margin
|
||||
-tab nnn Tab width
|
||||
-indentc nnn Indentation character (32 for space, 9 for tab)
|
||||
-istep nnn Number of indentation columns
|
||||
-french One space after '.', '?' and '!' for wordwrap
|
||||
and paragraph reformat instead of two. Joe
|
||||
does not change the spacing you give, but
|
||||
sometimes it must put spacing in itself. This
|
||||
selects how much is inserted.
|
||||
|
||||
-spaces TAB inserts spaces instead of tabs.
|
||||
|
||||
-linums Enable line numbers on each line
|
||||
-rdonly File is read-only
|
||||
-keymap name Keymap to use if not 'main'
|
||||
-lmsg Status line definition strings-
|
||||
-rmsg see previous section for more info.
|
||||
-mnew macro Macro to execute when new files are loaded
|
||||
-mold macro Macro to execute when existing files are loaded
|
||||
-msnew macro Macro to execute when new files are saved
|
||||
-msold macro Macro to execute when existing files are saved
|
||||
|
||||
Macros for the above options are in the same format as in the key
|
||||
binding section below- but without the key name strings.
|
||||
|
||||
*
|
||||
-wordwrap
|
||||
|
||||
*.c
|
||||
-mnew rtn,"/* This is a C file */",rtn
|
||||
-autoindent
|
||||
|
||||
*.h
|
||||
-autoindent
|
||||
|
||||
*akefile
|
||||
|
||||
*AKEFILE
|
||||
|
||||
*rc
|
||||
|
||||
*.p
|
||||
-autoindent
|
||||
|
||||
THIRD SECTION: Named help screens:
|
||||
|
||||
Use \i to turn on/off inverse video
|
||||
Use \u to turn on/off underline
|
||||
Use \b to turn on/off bold
|
||||
Use \d to turn on/off dim
|
||||
Use \f to turn on/off flash
|
||||
|
||||
{Basic
|
||||
\i Help Screen turn off with ^XH more help with ^X. \i
|
||||
\i \i\uCURSOR\u \uGO TO\u \uUNDO\u \uMISC\u \uREGION\u \uEXIT\u \i \i
|
||||
\i \i^B left ^F right ^[V prev screen ^XU undo ^[^[ option ^@ mark ^XK quit \i \i
|
||||
\i \i^P up ^N down ^V next screen ^^ redo ^[Q format ^W cut ^X^C save \i \i
|
||||
\i \i^[B prev. word ^A beg of line \uDELETE\u ^L refresh ^Y paste \uFILE\u \i \i
|
||||
\i \i^[F next word ^E end of line ^D char ^[$ spell ^[Y switch ^X^W save \i \i
|
||||
\i \i\uSEARCH\u ^[< top of file ^K >line ^[M math ^XA save ^XI insert\i \i
|
||||
\i \i^S forward ^[> end of file ^[D >word ^[% query ^[| filter ^X^F load \i \i
|
||||
\i \i^R backward ^[G to line No. ^[ DEL word< replace ^XX swap ^X^B switch\i \i
|
||||
}
|
||||
|
||||
{Editing
|
||||
\i Help Screen turn off with ^XH prev. screen ^X, next screen ^X. \i
|
||||
\i \i\uCASE\u \uTRANSPOSE\u \uINSERT\u \uMACROS\u \uPROGRAMS\u \i \i
|
||||
\i \i^[U Up word ^T Chars ^O line ^X( record ^X^I Indent region \i \i
|
||||
\i \i^[D Down word ^[T Words ^C space ^X) stop ^[. Tags file find \i \i
|
||||
\i \i^[C Cap. word ^X^T Lines ` Ctrl- ^XE play ^XG To matching ( [ { \i \i
|
||||
\i \i^X^U Up region ^XT text ^XQ query suspend ^XC Parse errors \i \i
|
||||
\i \i^X^L Down region ^U repeat prefix ^XN / ^XP next/prev err\i \i
|
||||
}
|
||||
|
||||
{Window
|
||||
\i Help Screen turn off with ^XH prev. screen ^X, next screen ^X. \i
|
||||
\i \i\uWINDOW\u \uSCROLL\u \uSHELL\u \uCURSOR\u \i \i
|
||||
\i \i^X2 Split window in half ^X^P up ^Z Suspend ^[P prev. paragraph \i \i
|
||||
\i \i^XO Switch to other window ^X^N down ^[! Command ^[N next paragraph \i \i
|
||||
\i \i^XZ Grow window ^X< left ^[' Window ^XG to matching ( [ { \i \i
|
||||
\i \i^X^Z Shrink window ^X> right \uBOOKMARK\u \i \i
|
||||
\i \i^X0 Kill window ^XJ set \i \i
|
||||
\i \i^X1 Kill all other windows ^X/ goto \i \i
|
||||
}
|
||||
|
||||
{Search
|
||||
\i Help Screen turn off with ^XH prev. screen ^X, next screen ^X. \i
|
||||
\i \iSpecial search sequences: \i \i
|
||||
\i \i \\^ \\$ matches beg./end of line \\? match any single char \i \i
|
||||
\i \i \\< \\> matches beg./end of word \\* match 0 or more chars \i \i
|
||||
\i \i \\c matches balanced C expression \\\\ matches a \\ \i \i
|
||||
\i \i \\[..] matches one of a set \\n matches a newline \i \i
|
||||
\i \i \\+ matches 0 or more of the character which follows the \\+ \i \i
|
||||
\i \iSpecial replace sequences: \i \i
|
||||
\i \i \\& replaced with text which matched search string \i \i
|
||||
\i \i \\0 - 9 replaced with text which matched Nth \\*, \\?, \\c, \\+, or \\[..] \i \i
|
||||
\i \i \\\\ replaced with \\ \\n replaced with newline \i \i
|
||||
}
|
||||
|
||||
{Names
|
||||
\i Help Screen turn off with ^XH prev. screen ^X, next screen ^X. \i
|
||||
\i \i Hit TAB at file name prompts to generate menu of file names \i \i
|
||||
\i \i Or use up/down keys to access history of previously entered names \i \i
|
||||
\i \i Special file names: \i \i
|
||||
\i \i !command Pipe in/out of a shell command \i \i
|
||||
\i \i >>filename Append to a file \i \i
|
||||
\i \i - Read/Write to/from standard I/O \i \i
|
||||
\i \i filename,START,SIZE Read/Write a part of a file/device \i \i
|
||||
\i \i Give START/SIZE in decimal (255), octal (0377) or hex (0xFF) \i \i
|
||||
}
|
||||
|
||||
{Joe
|
||||
\i Help Screen turn off with ^XH prev. screen ^X, \i
|
||||
\i \i Joe Allen's email address: 'jhallen@world.std.com' \i \i
|
||||
}
|
||||
|
||||
FOURTH SECTION: Key bindings:
|
||||
|
||||
Section names you must provide:
|
||||
|
||||
:main For editing window
|
||||
:prompt For prompt lines
|
||||
:query For single-character query lines
|
||||
:querya Singe-character query for quote
|
||||
:querysr Search & Replace single-character query
|
||||
|
||||
Other sections may be given as well for organization purposes or for
|
||||
use with the '-keymap' option.
|
||||
|
||||
Use:
|
||||
:inherit name To copy the named section into the current one
|
||||
:delete key To delete a key sequence from the current section
|
||||
|
||||
Keys:
|
||||
|
||||
Use ^@ through ^_ and ^? for Ctrl chars
|
||||
Use SP for space
|
||||
Use a TO b to generate a range of characters
|
||||
|
||||
You can also use termcap string capability names. For example:
|
||||
|
||||
.ku Up
|
||||
.kd Down
|
||||
.kl Left
|
||||
.kr Right
|
||||
.kh Home
|
||||
.kH End
|
||||
.kI Insert
|
||||
.kD Delete
|
||||
.kP PgUp
|
||||
.kN PgDn
|
||||
.k1 - .k9 F1 - F9
|
||||
.k0 F0 or F10... you decide.
|
||||
.k; F10
|
||||
|
||||
Macros:
|
||||
|
||||
Simple macros can be made by comma seperating 2 or more command names. For
|
||||
example:
|
||||
|
||||
bof,bol ^T Z Goto beginning of last line
|
||||
|
||||
Also quoted matter is typed in literally:
|
||||
|
||||
bol,">",dnarw .k1 Quote news article line
|
||||
|
||||
Macros may cross lines if they end with ,
|
||||
|
||||
:windows Bindings common to all windows
|
||||
type ^@ TO ÿ Self insert
|
||||
abort ^G Abort window
|
||||
abort ^X ^C
|
||||
abort ^C
|
||||
tw0 ^X 0 Delete window: can make orphan buffers
|
||||
tw1 ^X 1 Delete other windows: can make orphan buffers
|
||||
uarg ^U Repeat prefix
|
||||
uarg ^[ -
|
||||
uarg ^[ 0 TO 9
|
||||
help ^X h Help
|
||||
help ^X ^H
|
||||
hnext ^X .
|
||||
hprev ^X ,
|
||||
math ^[ m Calculator
|
||||
math ^[ M
|
||||
nextw ^X o Other window
|
||||
pgdn .kN Screen down
|
||||
pgdn ^V
|
||||
pgdn ^[ [ 6 ~
|
||||
pgup .kP Screen up
|
||||
pgup ^[ v
|
||||
pgup ^[ [ 5 ~
|
||||
play,"0" ^X e Execute keyboard macro
|
||||
prevw ^X p Previous window (uemacs)
|
||||
query ^X q Query insert
|
||||
record,"0" ^X ( Record macro
|
||||
retype ^L Refresh screen
|
||||
rtn ^M Return
|
||||
shell ^Z Suspend
|
||||
shell ^[ s Suspend (uemacs)
|
||||
stop ^X ) Stop recording macro
|
||||
|
||||
:main Text editing window
|
||||
:inherit windows
|
||||
|
||||
Spell-check macros
|
||||
|
||||
:def spellfile filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty >/dev/tty;cat ispell.tmp;/bin/rm ispell.tmp",rtn,retype
|
||||
:def spellword psh,nextword,markk,prevword,markb,filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty >/dev/tty;tr -d <ispell.tmp '\\012';/bin/rm ispell.tmp",rtn,retype,nextword
|
||||
|
||||
spellword ^[ $
|
||||
|
||||
ctrl ^Q Quote Ctrl chars
|
||||
ctrl ` Quote Ctrl chars
|
||||
|
||||
Macros of non-existant emacs functions
|
||||
|
||||
psh,nextword,markk,prevword,markb,filt,
|
||||
"tr [a-z] [A-Z]",rtn,nextword ^[ u Upcase word
|
||||
psh,nextword,markk,prevword,markb,filt,
|
||||
"tr [A-Z] [a-z]",rtn,nextword ^[ l Downcase word
|
||||
psh,nextword,markk,prevword,markb,filt,
|
||||
"tr [A-Z] [a-z]",rtn,rtarw,markk,filt,
|
||||
"tr [a-z] [A-Z]",rtn,nextword ^[ c Capitalize word
|
||||
psh,markk,filt,"tr [A-Z] [a-z]",rtn ^X ^L Downcase region
|
||||
psh,markk,filt,"tr [a-z] [A-Z]",rtn ^X ^U Upcase region
|
||||
psh,ltarw,markb,rtarw,markk,rtarw,
|
||||
blkmove,rtarw ^T Transpose chars
|
||||
psh,uparw,bol,markb,dnarw,markk,
|
||||
dnarw,blkmove,dnarw ^X ^T Transpose lines
|
||||
psh,prevword,markb,nextword,
|
||||
nextword,prevword,markk,nextword,
|
||||
nextword,prevword,blkmove,nextword ^[ t Transpose words
|
||||
eop,bop,markb,eop ^[ h Mark paragraph
|
||||
nextword,prevword,markb,nextword ^[ @ Mark word
|
||||
"()",ltarw ^[ ( Insert ()
|
||||
bol,insc,delw ^[ ^ Delete indentation
|
||||
psh,markk,copy,msg,"Region saved",rtn ^[ w Yank copy
|
||||
mode,"Rcol",rtn,
|
||||
msg,"Fill-column set",rtn ^X f Set right margin
|
||||
bol,rtn,backw,rtn,rtn,uparw,delw ^X ^O Delete blank lines
|
||||
" ",backw," ",insc,delw ^[ SP Just one space
|
||||
" ",backw,insc,delw ^[ \ Delete horizontal space
|
||||
stop,msg,"Abort",rtn ^G Abort message
|
||||
stop,msg,"Abort",rtn ^[ ^G Abort message
|
||||
stop,msg,"Abort",rtn ^X ^G Abort message
|
||||
psh,markk,blkdel ^W Cut
|
||||
save,rtn ^X ^S Save file
|
||||
ask ^X s
|
||||
drop,msg,"Mark set",rtn ^@ Drop anchor
|
||||
nextw,pgdn,prevw ^[ ^V Scroll other window down
|
||||
nextw,pgup,prevw ^[ ^Z Scroll other window up
|
||||
bol,nedge,pedge ^[ m Gnu-emacs goto indentation
|
||||
nextw,nbuf,prevw ^X 4 b Switch buffers other window
|
||||
nextw,edit,query,prevw ^X 4 f Find file other window
|
||||
nextw,edit,query,prevw ^X 4 ^F
|
||||
nextw,tag,query,prevw ^X 4 . Find tag other window
|
||||
ask,query,lose,query,abortbuf ^X ^C Gnu-emacs: Abort buffer in window
|
||||
exsave ^X ^C Save file and exit
|
||||
lose,query,abortbuf ^X k Kill buffer in window
|
||||
lose,query,edit ^X ^V Edit a file: no orphaned buffers
|
||||
psh,drop,fwrdc,query,markk,blkdel ^[ z Cut to char
|
||||
psh,markk,blksave,">>",query ^X a Append region to file
|
||||
retype,
|
||||
arg,"top+height/2-line",rtn,upslide ^L Recenter
|
||||
arg,"top+height/2-line",rtn,dnarw ^[ r Move to center line
|
||||
swap,math,"z=line",rtn,
|
||||
swap,msg,math,"line-z",rtn,
|
||||
" lines in region",rtn ^[ = Count lines region
|
||||
mode,"O" ^X ^Q Toggle read-only
|
||||
|
||||
edit,rtn,filt,query,parserr ^X c Compile
|
||||
nxterr ^X n
|
||||
prverr ^X p
|
||||
|
||||
backs ^? Backspace
|
||||
backs ^H
|
||||
backw ^[ ^? Backspace word
|
||||
backw ^[ ^H
|
||||
bknd ^X ' Shell window (joe)
|
||||
bof ^[ < Goto beginning of file
|
||||
bol .kh Goto beginning of line
|
||||
bol ^A
|
||||
bol ^[ [ H
|
||||
bol ^[ [ 1 ~
|
||||
bop ^[ p (uemacs)
|
||||
bufed ^X b
|
||||
bknd ^[ ' Shell window
|
||||
crawlr ^X > Scroll to the right
|
||||
crawll ^X < Scroll to the left
|
||||
delch .kD Delete character
|
||||
delch ^D
|
||||
deleol ^K Delete to end of line
|
||||
delw ^[ d Delete word
|
||||
dnarw .kd Go down
|
||||
dnarw ^N
|
||||
dnarw ^[ O B
|
||||
dnarw ^[ [ B
|
||||
dnslide ^X ^N Slide down (uemacs)
|
||||
edit ^X ^F Edit a file: creates orphaned buffers
|
||||
eof ^[ > Go to end of file
|
||||
eol .kH Go to end of line
|
||||
eol ^E
|
||||
eol ^[ [ F
|
||||
eol ^[ [ 4 ~
|
||||
eop ^[ n (uemacs)
|
||||
execmd ^[ x
|
||||
insc ^C (uemacs)
|
||||
ffirst ^S Search forward
|
||||
isrch ^S
|
||||
ffirst ^\
|
||||
psh,markk,filt,query ^[ | Filter block
|
||||
format ^[ q Format paragraph
|
||||
gomark ^X / Goto bookmark
|
||||
groww ^X ^ Enlarge window
|
||||
groww ^X z (uemacs)
|
||||
insf ^X i Insert a file
|
||||
yapp ^[ ^W Append next kill
|
||||
line ^[ g Goto line (uemacs)
|
||||
ltarw .kl Go left
|
||||
ltarw ^B
|
||||
ltarw ^[ O D
|
||||
ltarw ^[ [ D
|
||||
mode ^[ ^[ Change modes
|
||||
nbuf ^X ^B Next buffer in current window
|
||||
nbuf ^X x (uemacs)
|
||||
nextpos ^K = Goto next position in position history
|
||||
nextword ^[ f Goto next word
|
||||
notmod ^[ ~ Not modified
|
||||
open ^O Split line
|
||||
open ^[ ^O
|
||||
pbuf ^X b Previous buffer in current window
|
||||
prevpos ^K - Goto previous position in position history
|
||||
prevword ^[ b Previous word
|
||||
qrepl ^[ % Query replace
|
||||
qrepl ^[ r Query replace (uemacs)
|
||||
qrepl ^[ ^R Query replace (uemacs)
|
||||
redo ^^ Redo changes
|
||||
rfirst ^R Search backwards
|
||||
rsrch ^R Incremental search backwards
|
||||
rindent ^X ^I Indent to the right
|
||||
rindent ^[ ^\
|
||||
rtarw .kr Go right
|
||||
rtarw ^F
|
||||
rtarw ^[ O C
|
||||
rtarw ^[ [ C
|
||||
run ^[ !
|
||||
save ^X ^W Write file
|
||||
setmark ^X j Set bookmark
|
||||
shrinkw ^X ^Z (uemacs)
|
||||
splitw ^X 2 Split window
|
||||
stat ^X l Show status
|
||||
stat ^X =
|
||||
swap ^X ^X Swap mark and cursor
|
||||
tag ^[ . Tag search
|
||||
tomatch ^X g Goto matching parenthasis (joe)
|
||||
tomatch ^[ ^F (uemacs)
|
||||
txt ^X t Prompt for text to insert
|
||||
undo ^_ Undo changes
|
||||
undo ^X u
|
||||
uparw .ku Go up
|
||||
uparw ^P
|
||||
uparw ^[ O A
|
||||
uparw ^[ [ A
|
||||
upslide ^X ^P Slide up (uemacs)
|
||||
yank ^Y Yank deleted text
|
||||
yankpop ^[ y Yank-pop
|
||||
|
||||
:prompt Prompt windows
|
||||
:inherit main
|
||||
abort ^G
|
||||
abort ^C
|
||||
complete ^I
|
||||
|
||||
:menu Selection menus
|
||||
:inherit windows
|
||||
abort ^[ ^[
|
||||
backsmenu ^?
|
||||
backsmenu ^H
|
||||
bofmenu ^K U
|
||||
bofmenu ^K ^U
|
||||
bofmenu ^K u
|
||||
bolmenu .kh
|
||||
bolmenu ^A
|
||||
dnarwmenu .kd
|
||||
dnarwmenu ^N
|
||||
dnarwmenu ^[ [ B
|
||||
dnarwmenu ^[ O B
|
||||
eofmenu ^K V
|
||||
eofmenu ^K ^V
|
||||
eofmenu ^K v
|
||||
eolmenu .kH
|
||||
eolmenu ^E
|
||||
ltarwmenu .kl
|
||||
ltarwmenu ^B
|
||||
ltarwmenu ^[ [ D
|
||||
ltarwmenu ^[ O D
|
||||
rtarwmenu .kr
|
||||
rtarwmenu ^F
|
||||
rtarwmenu ^[ [ C
|
||||
rtarwmenu ^[ O C
|
||||
rtn SP
|
||||
rtn ^I
|
||||
rtn ^X H
|
||||
rtn ^X h
|
||||
rtn ^X ^H
|
||||
uparwmenu .ku
|
||||
uparwmenu ^P
|
||||
uparwmenu ^[ [ A
|
||||
uparwmenu ^[ O A
|
||||
|
||||
:querysr Search & replace query window
|
||||
type ^@ TO ÿ
|
||||
|
||||
:query Single-key query window
|
||||
:inherit windows
|
||||
|
||||
:querya Single-key query window for quoting
|
||||
type ^@ TO ÿ
|
588
script/bbsjoerc
Normal file
588
script/bbsjoerc
Normal file
@ -0,0 +1,588 @@
|
||||
$Id$
|
||||
|
||||
Initialization file for JOE
|
||||
Restricted access Joe
|
||||
|
||||
JOE looks for this file in:
|
||||
1 - .joerc
|
||||
2 - $HOME/.joerc
|
||||
3 - /usr/local/lib/joerc
|
||||
|
||||
This file can include other files by placing the following include command
|
||||
in the first column:
|
||||
|
||||
:include filename
|
||||
|
||||
FIRST SECTION: Default global options (these options can also be specified
|
||||
on the command line. Also the NOXON, LINES, COLUMNS, DOPADDING and BAUD
|
||||
options can be specified in environment variables):
|
||||
|
||||
Put each option you want set in the first column:
|
||||
|
||||
-option Sets the option
|
||||
--option Clears the option
|
||||
|
||||
-mid Cursor is recentered when scrolling is necessary
|
||||
|
||||
-marking Text between ^KB and cursor is highlighted (use with -lightoff)
|
||||
|
||||
-asis Characters 128 - 255 shown as-is
|
||||
|
||||
-force Force final newline when files are saved
|
||||
|
||||
-nobackups If you don't want backup files to be created
|
||||
|
||||
-lightoff Turn off highlighting after block copy or move
|
||||
|
||||
--exask ^KX always confirms file name
|
||||
|
||||
-beep Beep on errors and when cursor goes past extremes
|
||||
|
||||
-nosta Disable top-most status line
|
||||
|
||||
-keepup %k and %c status line escape sequences updated frequently
|
||||
|
||||
-pg nnn No. lines to keep for PgUp/PgDn
|
||||
|
||||
-csmode ^KF after a pervious search does a ^L instead
|
||||
|
||||
-backpath path Directory to store backup files
|
||||
|
||||
-nonotice Disable copyright notice
|
||||
|
||||
-noxon Attempt to turn off ^S/^Q processing
|
||||
|
||||
-orphan Put extra files given on command line in orphaned buffers
|
||||
instead of in windows
|
||||
|
||||
-dopadding Output pad characters (for when there is no tty handshaking)
|
||||
|
||||
-lines nnn Set no. screen lines
|
||||
|
||||
-baud nnn Set baud rate for terminal optimizations
|
||||
|
||||
-columns nnn Set no. screen columns
|
||||
|
||||
--help Start with help on
|
||||
|
||||
-skiptop 4 Don't use top nnn lines of the screen
|
||||
|
||||
Status line definition strings. -lmsg defines the left-justified string and
|
||||
-rmsg defines the right-justified string. The first character of -rmsg is
|
||||
the background fill character. The following escape sequences can be used
|
||||
in these strings:
|
||||
|
||||
%t 12 hour time
|
||||
%u 24 hour time
|
||||
%T O for overtype mode, I for insert mode
|
||||
%W W if wordwrap is enabled
|
||||
%I A if autoindent is enabled
|
||||
%X Rectangle mode indicator
|
||||
%n File name
|
||||
%m '(Modified)' if file has been changed
|
||||
%* '*' if file has been changed
|
||||
%R Read-only indicator
|
||||
%r Row (line) number
|
||||
%c Column number
|
||||
%o Byte offset into file
|
||||
%O Byte offset into file in hex
|
||||
%a Ascii value of character under cursor
|
||||
%A Ascii value of character under cursor in hex
|
||||
%p Percent of file cursor is at
|
||||
%l No. lines in file
|
||||
%k Entered prefix keys
|
||||
%S '*SHELL*' if there is a shell running in window
|
||||
%M Macro recording message
|
||||
|
||||
These formatting escape sequences may also be given:
|
||||
|
||||
\i Inverse
|
||||
\u Underline
|
||||
\b Bold
|
||||
\d Dim
|
||||
\f Blink
|
||||
|
||||
-lmsg \i%k%T%W%I%X %n %m%R %M
|
||||
-rmsg %S Row %r Col %c %t Ctrl-K H for help
|
||||
|
||||
SECOND SECTION: File name dependant local option settings:
|
||||
|
||||
Each line with '*' in the first column indicates the modes which should be
|
||||
set for files which match the regular expression. If more than one regular
|
||||
expression matches the file name, then the last matching one is chosen.
|
||||
|
||||
Here are the modes which can be set:
|
||||
|
||||
-wordwrap Wordwrap
|
||||
|
||||
-autoindent Auto indent
|
||||
|
||||
-overwrite Overtype mode
|
||||
|
||||
-lmargin nnn Left margin
|
||||
|
||||
-rmargin nnn Right margin
|
||||
|
||||
-tab nnn Tab width
|
||||
|
||||
-indentc nnn Indentation character (32 for space, 9 for tab)
|
||||
|
||||
-istep nnn Number of indentation columns
|
||||
|
||||
-french One space after '.', '?' and '!' for wordwrap
|
||||
and paragraph reformat instead of two. Joe
|
||||
does not change the spacing you give, but
|
||||
sometimes it must put spacing in itself. This
|
||||
selects how much is inserted.
|
||||
|
||||
-spaces TAB inserts spaces instead of tabs.
|
||||
|
||||
-linums Enable line numbers on each line
|
||||
|
||||
-rdonly File is read-only
|
||||
|
||||
-keymap name Keymap to use if not 'main'
|
||||
|
||||
-lmsg Status line definition strings-
|
||||
-rmsg see previous section for more info.
|
||||
|
||||
-mnew macro Macro to execute when new files are loaded
|
||||
-mold macro Macro to execute when existing files are loaded
|
||||
-msnew macro Macro to execute when new files are saved
|
||||
-msold macro Macro to execute when existing files are saved
|
||||
|
||||
Macros for the above options are in the same format as in the key
|
||||
binding section below- but without the key name strings.
|
||||
|
||||
*
|
||||
-wordwrap
|
||||
|
||||
*.c
|
||||
-mnew rtn,"/* This is a C file */",rtn
|
||||
-autoindent
|
||||
|
||||
*.h
|
||||
-autoindent
|
||||
|
||||
*akefile
|
||||
*AKEFILE
|
||||
*rc
|
||||
|
||||
*.p
|
||||
-autoindent
|
||||
|
||||
THIRD SECTION: Named help screens:
|
||||
|
||||
Use \i to turn on/off inverse video
|
||||
Use \u to turn on/off underline
|
||||
Use \b to turn on/off bold
|
||||
Use \d to turn on/off dim
|
||||
Use \f to turn on/off flash
|
||||
|
||||
{Basic
|
||||
\i Help Screen turn off with ^KH more help with ESC . (^[.) \i
|
||||
\i \i\uCURSOR\u \uGO TO\u \uBLOCK\u \uDELETE\u \uMISC\u \uEXIT\u \i \i
|
||||
\i \i^B left ^F right ^U prev. screen ^KB begin ^D char. ^KJ reformat ^KX save \i \i
|
||||
\i \i^P up ^N down ^C next screen ^KK end ^Y line ^V Ins/Ovr ^KQ abort \i \i
|
||||
\i \i^Z previous word ^A beg. of line ^KM move ^W >word ^R refresh \i \i
|
||||
\i \i^X next word ^E end of line ^KC copy ^O word< ^@ ins char \i \i
|
||||
\i \i\uSEARCH\u ^KU top of file ^KY delete ^J >line \uSPELL\u \i \i
|
||||
\i \i^KF find text ^KV end of file ^_ undo ^[N word \i \i
|
||||
\i \i^L find next ^KL to line No. ^^ redo ^[L file \i \i
|
||||
}
|
||||
|
||||
{Windows
|
||||
\i Help Screen turn off with ^KH prev. screen ^[, next screen ^[. \i
|
||||
\i \i^KO Split the window in half \i \i
|
||||
\i \i^KG Make current window bigger ^KT Make current window smaller \i \i
|
||||
\i \i^KN Go to the window below ^KP Go to the window above \i \i
|
||||
\i \i^KQ Eliminate the current window ^KI Show all windows / Show one window\i \i
|
||||
}
|
||||
|
||||
{Advanced
|
||||
\i Help Screen turn off with ^KH prev. screen ^[, next screen ^[. \i
|
||||
\i \i\uMACROS\u \uMISC\u \uSCROLL\u \uGOTO\u \uI-SEARCH\u \i \i
|
||||
\i \i^K[ 0-9 Record ^K SPACE status ^[W Up ^[B To ^KB ^[R Backwards\i \i
|
||||
\i \i^K] Stop ^K\\ Repeat ^[Z Down ^[K To ^KK ^[S Forwards \i \i
|
||||
\i \i^K 0-9 Play ^[M Math ^K< Left \uQUOTE\u \uDELETE\u \uBOOKMARKS\u \i \i
|
||||
\i \i^K? Query ^KA Center line ^K> Right ` Ctrl- ^[Y yank ^[ 0-9 Goto \i \i
|
||||
\i \i^[D Dump ^[H Message ^\\ Meta- ^[O line< ^[^[ Set \i \i
|
||||
}
|
||||
|
||||
{Programs
|
||||
\i Help Screen turn off with ^KH prev. screen ^[, next screen ^[. \i
|
||||
\i \i\uGOTO\u \uINDENT\u \i \i
|
||||
\i \i^G Matching ( [ { ^K, less \i \i
|
||||
\i \i^K- Previous place ^K. more \i \i
|
||||
\i \i^K= Next place \i \i
|
||||
\i \i \i \i
|
||||
}
|
||||
|
||||
{Search
|
||||
\i Help Screen turn off with ^KH prev. screen ^[, next screen ^[. \i
|
||||
\i \iSpecial search sequences: \i \i
|
||||
\i \i \\^ \\$ matches beg./end of line \\? match any single char \i \i
|
||||
\i \i \\< \\> matches beg./end of word \\* match 0 or more chars \i \i
|
||||
\i \i \\c matches balanced C expression \\\\ matches a \\ \i \i
|
||||
\i \i \\[..] matches one of a set \\n matches a newline \i \i
|
||||
\i \i \\+ matches 0 or more of the character which follows the \\+ \i \i
|
||||
\i \iSpecial replace sequences: \i \i
|
||||
\i \i \\& replaced with text which matched search string \i \i
|
||||
\i \i \\0 - 9 replaced with text which matched Nth \\*, \\?, \\c, \\+, or \\[..] \i \i
|
||||
\i \i \\\\ replaced with \\ \\n replaced with newline \i \i
|
||||
}
|
||||
|
||||
{Joe
|
||||
\i Help Screen turn off with ^KH prev. screen ^[, \i
|
||||
\i \i Send bug reports to: Joe Allen (jhallen@world.std.com) \i \i
|
||||
}
|
||||
|
||||
FOURTH SECTION: Key bindings:
|
||||
|
||||
Section names you must provide:
|
||||
|
||||
:main For editing window
|
||||
:prompt For prompt lines
|
||||
:query For single-character query lines
|
||||
:querya Singe-character query for quote
|
||||
:querysr Search & Replace single-character query
|
||||
|
||||
Other sections may be given as well for organization purposes or for
|
||||
use with the '-keymap' option.
|
||||
|
||||
Use:
|
||||
:inherit name To copy the named section into the current one
|
||||
:delete key To delete a key sequence from the current section
|
||||
|
||||
Keys:
|
||||
|
||||
Use ^@ through ^_ and ^? for Ctrl chars
|
||||
Use SP for space
|
||||
Use a TO b to generate a range of characters
|
||||
|
||||
You can also use termcap string capability names. For example:
|
||||
|
||||
.ku Up
|
||||
.kd Down
|
||||
.kl Left
|
||||
.kr Right
|
||||
.kh Home
|
||||
.kH End
|
||||
.kI Insert
|
||||
.kD Delete
|
||||
.kP PgUp
|
||||
.kN PgDn
|
||||
.k1 - .k9 F1 - F9
|
||||
.k0 F0 or F10
|
||||
.k; F10
|
||||
|
||||
Macros:
|
||||
|
||||
Simple macros can be made by comma seperating 2 or more command names. For
|
||||
example:
|
||||
|
||||
bof,bol ^T Z Goto beginning of last line
|
||||
|
||||
Also quoted matter is typed in literally:
|
||||
|
||||
bol,">",dnarw .k1 Quote news article line
|
||||
|
||||
Macros may cross lines if they end with ,
|
||||
|
||||
:windows Bindings common to all windows
|
||||
type ^@ TO ÿ Type a character
|
||||
abort ^K q Abort window
|
||||
abort ^K Q
|
||||
abort ^K ^Q
|
||||
abort ^K q
|
||||
arg ^K \ Repeat next command
|
||||
explode ^K I Show all windows or show only one window
|
||||
explode ^K ^I
|
||||
explode ^K i
|
||||
help ^K H Help menu
|
||||
help ^K ^H
|
||||
help ^K h
|
||||
hnext ^[ . Next help window
|
||||
hprev ^[ , Previous help window
|
||||
math ^[ m Calculator
|
||||
math ^[ M Calculator
|
||||
math ^[ ^M Calculator
|
||||
msg ^[ h Display a message
|
||||
msg ^[ H Display a message
|
||||
msg ^[ ^H Display a message
|
||||
nextw ^K N Goto next window
|
||||
nextw ^K ^N
|
||||
nextw ^K n
|
||||
pgdn .kN Screen down
|
||||
pgdn ^C
|
||||
pgdn ^[ [ 6 ~
|
||||
pgup .kP Screen up
|
||||
pgup ^U
|
||||
pgup ^[ [ 5 ~
|
||||
play ^K 0 TO 9 Execute macro
|
||||
prevw ^K P Goto previous window
|
||||
prevw ^K ^P
|
||||
prevw ^K p
|
||||
query ^K ? Macro query insert
|
||||
record ^K [ Record a macro
|
||||
retype ^R Refresh screen
|
||||
rtn ^M Return
|
||||
shell ^K Z Shell escape
|
||||
shell ^K ^Z
|
||||
shell ^K z
|
||||
stop ^K ] Stop recording
|
||||
|
||||
:main Text editing window
|
||||
:inherit windows
|
||||
|
||||
Spell-check macros
|
||||
|
||||
:def spellfile filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty >/dev/tty;cat ispell.tmp;/bin/rm ispell.tmp",rtn,retype
|
||||
:def spellword psh,nextword,markk,prevword,markb,filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty >/dev/tty;tr -d <ispell.tmp '\\012';/bin/rm ispell.tmp",rtn,retype,nextword
|
||||
:def toggleinsert mode,"T"
|
||||
spellword ^[ n
|
||||
spellfile ^[ l
|
||||
toggleinsert ^V
|
||||
|
||||
Extra functions not really part of JOE user interface:
|
||||
|
||||
delbol ^[ o Delete to beginning of line
|
||||
delbol ^[ ^O Delete to beginning of line
|
||||
dnslide ^[ z Scroll down one line
|
||||
dnslide ^[ Z Scroll down one line
|
||||
dnslide ^[ ^Z Scroll down one line
|
||||
edit,rtn,filt,
|
||||
query,parserr ^[ c Compile
|
||||
edit,rtn,filt,
|
||||
query,parserr ^[ ^C Compile
|
||||
execmd ^[ x Prompt for command to execute
|
||||
execmd ^[ X Prompt for command to execute
|
||||
execmd ^[ ^X Prompt for command to execute
|
||||
isrch ^[ s Forward incremental search
|
||||
isrch ^[ S Forward incremental search
|
||||
isrch ^[ ^S Forward incremental search
|
||||
notmod ^[ ~ Not modified
|
||||
nxterr ^[ = To next error
|
||||
parserr ^[ e Parse errors in current buffer
|
||||
parserr ^[ E Parse errors in current buffer
|
||||
parserr ^[ ^E Parse errors in current buffer
|
||||
prverr ^[ - To previous error
|
||||
rsrch ^[ r Backward incremental search
|
||||
rsrch ^[ R Backward incremental search
|
||||
rsrch ^[ ^R Backward incremental search
|
||||
run ^[ ! Run a program in a window
|
||||
tomarkb ^[ b Go to beginning of marked block
|
||||
tomarkb ^[ ^B Go to beginning of marked block
|
||||
tomarkk ^[ k Go to end of marked block
|
||||
tomarkk ^[ ^K Go to end of marked block
|
||||
tomarkk ^[ K Go to end of marked block
|
||||
txt ^[ i Prompt for text and insert it
|
||||
txt ^[ ^I Prompt for text and insert it
|
||||
txt ^[ I Prompt for text and insert it
|
||||
upslide ^[ w Scroll up one line
|
||||
upslide ^[ ^W Scroll up one line
|
||||
upslide ^[ W Scroll up one line
|
||||
yankpop ^[ y Undelete text
|
||||
yankpop ^[ ^Y Undelete text
|
||||
yankpop ^[ Y Undelete text
|
||||
|
||||
bufed ^[ d Menu of buffers
|
||||
pbuf ^[ . Next buffer
|
||||
nbuf ^[ , Prev buffer
|
||||
query ^[ q Quoted insert
|
||||
byte ^[ n Goto byte
|
||||
col ^[ c Goto column
|
||||
abortbuf ^[ k Kill current buffer- don't mess with windows
|
||||
ask ^[ a Ask to save current buffer
|
||||
bop ^[ p Backwards paragraph
|
||||
bos ^[ x Bottom of screen
|
||||
copy ^[ ^W Copy block into yank
|
||||
dupw ^[ \ Split window
|
||||
eop ^[ n Forwards paragraph
|
||||
format ^[ j Format paragraph ignore block
|
||||
markl ^[ l Mark line
|
||||
nmark ^[ @ Turn off ^KB ^KK
|
||||
pop ^[ > Pop ^KB ^KK
|
||||
psh ^[ < Push ^KB ^KK
|
||||
swap ^[ x Swap ^KB and cursor
|
||||
tomarkbk ^[ g Switch between beginning and end of marked
|
||||
tos ^[ e Top of screen
|
||||
tw0 ^[ 0 Kill current window (orphans buffer)
|
||||
tw1 ^[ 1 Kill all other windows (orphans buffers)
|
||||
uarg ^[ u Universal argument
|
||||
yank ^[ ^Y Undelete previous text
|
||||
yapp ^[ w Append next delete to previous yank
|
||||
|
||||
Standard JOE user interface
|
||||
|
||||
quote8 ^\ Enter Meta chars
|
||||
quote ` Enter Ctrl chars
|
||||
|
||||
backs ^? Backspace
|
||||
backs ^H
|
||||
backw ^O Backspace word
|
||||
bknd ^K ' Shell window
|
||||
blkcpy ^K C Copy marked block
|
||||
blkcpy ^K ^C
|
||||
blkcpy ^K c
|
||||
blkdel ^K Y Delete marked block
|
||||
blkdel ^K ^Y
|
||||
blkdel ^K y
|
||||
blkmove ^K M Move marked block
|
||||
blkmove ^K ^M
|
||||
blkmove ^K m
|
||||
blksave ^K W Save marked block
|
||||
blksave ^K ^W
|
||||
blksave ^K w
|
||||
bof ^K U Goto beginning of file
|
||||
bof ^K ^U
|
||||
bof ^K u
|
||||
bol .kh Goto beginning of line
|
||||
bol ^A
|
||||
center ^K A Center line
|
||||
center ^K ^A
|
||||
center ^K a
|
||||
crawll ^K < Pan left
|
||||
crawlr ^K > Pan right
|
||||
delch .kD Delete character
|
||||
delch ^D
|
||||
deleol ^J Delete to end of line
|
||||
dellin ^Y Delete entire line
|
||||
delw ^W Delete word to right
|
||||
dnarw .kd Go down
|
||||
dnarw ^N
|
||||
dnarw ^[ O B
|
||||
dnarw ^[ [ B
|
||||
edit ^K E Edit a file
|
||||
edit ^K ^E
|
||||
edit ^K e
|
||||
eof ^K V Go to end of file
|
||||
eof ^K ^V
|
||||
eof ^K v
|
||||
eol .kH Go to end of line
|
||||
eol ^E
|
||||
exsave ^K X Save and exit
|
||||
exsave ^K ^X
|
||||
exsave ^K x
|
||||
ffirst ^K F Find first
|
||||
ffirst ^K ^F
|
||||
ffirst ^K f
|
||||
filt ^K / Filter block
|
||||
fnext ^L Find next
|
||||
fmtblk ^K J Format paragraphs in block
|
||||
fmtblk ^K ^J
|
||||
fmtblk ^K j
|
||||
gomark ^[ 0 TO 9 Goto bookmark
|
||||
groww ^K G Grow window
|
||||
groww ^K ^G
|
||||
groww ^K g
|
||||
insc .kI Insert a space
|
||||
insc ^@
|
||||
insf ^K R Insert a file
|
||||
insf ^K ^R
|
||||
insf ^K r
|
||||
lindent ^K , Indent to left
|
||||
line ^K L Goto line no.
|
||||
line ^K ^L
|
||||
line ^K l
|
||||
ltarw .kl Go left
|
||||
ltarw ^B
|
||||
ltarw ^[ O D
|
||||
ltarw ^[ [ D
|
||||
macros ^[ d Dump keyboard macros
|
||||
macros ^[ ^D
|
||||
markb ^K B Set beginning of marked block
|
||||
markb ^K ^B
|
||||
markb ^K b
|
||||
markk ^K K Set end of marked block
|
||||
markk ^K ^K
|
||||
markk ^K k
|
||||
mode ^T Options menu
|
||||
nextpos ^K = Goto next position in position history
|
||||
nextword ^X Goto next word
|
||||
open ^] Split line
|
||||
prevpos ^K - Previous position in history
|
||||
prevword ^Z Previous word
|
||||
redo ^^ Redo changes
|
||||
rindent ^K . Indent to right
|
||||
rtarw .kr Go right
|
||||
rtarw ^F
|
||||
rtarw ^[ O C
|
||||
rtarw ^[ [ C
|
||||
ask ^K D Save file- no prompt
|
||||
ask ^K S
|
||||
ask ^K ^D
|
||||
ask ^K ^S
|
||||
ask ^K d
|
||||
ask ^K s
|
||||
save ^K D Save file
|
||||
save ^K S
|
||||
save ^K ^D
|
||||
save ^K ^S
|
||||
save ^K d
|
||||
save ^K s
|
||||
setmark ^[ ^[ Set bookmark
|
||||
shrinkw ^K T Shrink window
|
||||
shrinkw ^K ^T
|
||||
shrinkw ^K t
|
||||
splitw ^K O Split window
|
||||
splitw ^K ^O
|
||||
splitw ^K o
|
||||
stat ^K SP Show status
|
||||
tag ^K ; Tags file search
|
||||
tomatch ^G Goto matching parenthasis
|
||||
undo ^_ Undo changes
|
||||
uparw .ku Go up
|
||||
uparw ^P
|
||||
uparw ^[ O A
|
||||
uparw ^[ [ A
|
||||
|
||||
:prompt Prompt windows
|
||||
:inherit main
|
||||
complete ^I
|
||||
|
||||
:menu Selection menus
|
||||
:inherit windows
|
||||
abort ^[ ^[
|
||||
backsmenu ^?
|
||||
backsmenu ^H
|
||||
bofmenu ^K U
|
||||
bofmenu ^K ^U
|
||||
bofmenu ^K u
|
||||
bolmenu .kh
|
||||
bolmenu ^A
|
||||
dnarwmenu .kd
|
||||
dnarwmenu ^N
|
||||
dnarwmenu ^[ [ B
|
||||
dnarwmenu ^[ O B
|
||||
eofmenu ^K V
|
||||
eofmenu ^K ^V
|
||||
eofmenu ^K v
|
||||
eolmenu .kH
|
||||
eolmenu ^E
|
||||
ltarwmenu .kl
|
||||
ltarwmenu ^B
|
||||
ltarwmenu ^[ [ D
|
||||
ltarwmenu ^[ O D
|
||||
rtarwmenu .kr
|
||||
rtarwmenu ^F
|
||||
rtarwmenu ^[ [ C
|
||||
rtarwmenu ^[ O C
|
||||
rtn SP
|
||||
rtn ^I
|
||||
rtn ^K H
|
||||
rtn ^K h
|
||||
rtn ^K ^H
|
||||
uparwmenu .ku
|
||||
uparwmenu ^P
|
||||
uparwmenu ^[ [ A
|
||||
uparwmenu ^[ O A
|
||||
|
||||
:query Single-key query window
|
||||
:inherit windows
|
||||
|
||||
:querya Single-key query window for quoting
|
||||
type ^@ TO ÿ
|
||||
|
||||
:querysr Search & replace query window
|
||||
type ^@ TO ÿ
|
99
script/editor
Normal file
99
script/editor
Normal file
@ -0,0 +1,99 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Script to start joe editor as external editor for MBSE BBS
|
||||
# Written by Redy Rodriguez.
|
||||
|
||||
### Function to kill the editor when no time left
|
||||
function alarma
|
||||
{
|
||||
sleep $1m
|
||||
killall $2 >/dev/null 2>&1
|
||||
}
|
||||
|
||||
## Set term environmment
|
||||
export JOETERM=ansi.sys
|
||||
|
||||
## Read variables from data.msg
|
||||
. ~/data.msg
|
||||
|
||||
## Read time left from door.sys
|
||||
TIME=`head -n19 ~/door.sys |tail -n1 |tr -d "[:cntrl:]"`
|
||||
|
||||
## Set preferred editor and parameters
|
||||
EDITOR=/usr/bin/bbsjoe
|
||||
PARAM="~/edit.msg"
|
||||
|
||||
# Using joe with emacs keys:
|
||||
# You can make a bbsjmacsrc file with emacs keys and put it
|
||||
# in /usr/lib/joe, and then a symlink to joe called bbsjmacs
|
||||
# in /usr/bin (dirs can change in other distros), and then
|
||||
# uncomment next line. If user select Emacs keys then this
|
||||
# editor was selected.
|
||||
|
||||
if [ "BBSFSEDKEYS" = "1" ]; then EDITOR=/usr/bin/bbsjmacs; fi
|
||||
|
||||
|
||||
## Setting Language environmment for msg header
|
||||
case $BBSLANGUAGE in
|
||||
## Spanish
|
||||
S)
|
||||
LANGAREA='AREA'
|
||||
LANGFROM='De '
|
||||
LANGTO='Para '
|
||||
LANGRE='Asunto '
|
||||
;;
|
||||
## Galician
|
||||
G)
|
||||
LANGAREA='AREA'
|
||||
LANGFROM='De '
|
||||
LANGTO='Para '
|
||||
LANGRE='Asunto '
|
||||
;;
|
||||
## Italian
|
||||
I)
|
||||
LANGAREA='AREA'
|
||||
LANGFROM='Da '
|
||||
LANGTO='A '
|
||||
LANGRE='Oggetto '
|
||||
;;
|
||||
## German
|
||||
D)
|
||||
LANGAREA='BEREICH'
|
||||
LANGFROM='Von '
|
||||
LANGTO='An '
|
||||
LANGRE='Betreff '
|
||||
;;
|
||||
## Dutch
|
||||
N)
|
||||
LANGAREA='Gebied'
|
||||
LANGFROM='Van '
|
||||
LANGTO='Aan '
|
||||
LANGRE='Onderwerp'
|
||||
;;
|
||||
|
||||
## Languages not set defaults to english.
|
||||
else
|
||||
LANGAREA='AREA'
|
||||
LANGFROM='FROM '
|
||||
LANGTO='TO '
|
||||
LANGRE='SUBJECT '
|
||||
;;
|
||||
esac
|
||||
|
||||
## Set Alarm to kill editor when no time left
|
||||
alarma $TIME $EDITOR &
|
||||
|
||||
## Draw header and call editor
|
||||
clear
|
||||
echo "[2J[1;1H[0m[1;44m
|
||||
[1;1H[0m[1;44m$LANGAREA: [31m$AREANUM[37m [33m$AREA
|
||||
[0;37;40m[A[79C [1;33m$LANGFROM: [32m$MSGFROM[0;37m
|
||||
[A[79C [1;33m$LANGTO: [0;32m$MSGTO [36m$MSGTOADDR[37m
|
||||
[A[79C [1;33m$LANGRE: [0;32m$MSGSUBJECT[37m
|
||||
[A[79C [0m"
|
||||
$EDITOR $PARAM
|
||||
## kill alarm
|
||||
killall sleep >/dev/null 2>&1
|
||||
clear
|
Reference in New Issue
Block a user