home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
fed024.zip
/
fed.ini
< prev
next >
Wrap
Text File
|
1999-03-08
|
16KB
|
466 lines
//Module :FED.INI
//Abstract :Sample FED initialization file
//
//Copyright (C) Sergey I. Yevtushenko
//
//Log: Fri 27/03/1998 Created
// Mon 20/04/1998 Updated
//
editor.hiliting = "CPP:*.c;*.cpp;*.cxx;*.cc;*.h;*.hpp;*.hxx;*.rc;fed.ini\n",
"REXX:*.cmd\n",
"ASM:*.asm\n",
"MAKE:*.mak;makefile\n",
"HTML:*.htm;*.html\n",
"MAIL:*.bod;*.msg\n",
"PAS:*.int;*.pas\n"
editor.untitled = ".Untitled"
cursor.shape.insert = 90
cursor.shape.overwrite = 30
editor.statusline = "[%n] L%4r:C%2c CHR(%xh,%3dd) [%h:%a:%u:%t:%f]"
editor.helptext =,
"FED key assignment:",
"\n",
" Esc - Exit \n",
"\n",
" Gray + - next open file \n",
" Gray - - previous open file \n",
" Alt+_ - open files list \n",
"\n",
" F2 - save file \n",
" Alt+F2 - save file as ...\n",
" F3 - open file \n",
" Alt+F3 - open new .Untitled \n",
" Alt+F4 - close file \n",
"\n",
" Arrow keys - move cursor \n",
" Home - line begin \n",
" End - line end \n",
" PgUp - screen up \n",
" PgDn - screen down \n",
" Ctrl+PgUp - file begin \n",
" Ctrl+PgDn - file end \n",
" Ctrl+Left - word left \n",
" Ctrl+Right - word right \n",
" Ctrl+J - go to line \n",
" Alt+J - go to column \n",
" Alt+? - find matching bracket \n",
" Alt+] - indent \n",
" Alt+[ - unindent \n",
"\n",
" Ctrl+Y - delete line \n",
" Ctrl+T - delete word right \n",
" Ctrl+Y - delete line \n",
" Ctrl+E - delete to end of line \n",
"\n",
" Shift+Arrow - mark block \n",
" Shift+Ins - paste from clipboard \n",
" Shift+Del - cut to clipboard \n",
" Alt+Bksp - undo \n",
"\n",
" Alt+H - flip hiliting modes \n",
" Alt+A - auto indent on/off \n",
" Alt+S - flip block/stream marking \n",
" Alt+F - search dialog \n",
" Ctrl+L - search again \n",
" Alt+U - convert characters to upper case \n",
" Alt+L - convert characters to lower case \n",
" Alt+M - flip Unix/DOS file type\n",
"\n"
//editor.force.pm=0
//editor.default.format=0
kbAltShiftDiv = MatchBracketMark
kbAltA = FlipAutoindent
kbAltBksp = Undo
kbAltDiv = MatchBracket
kbAltF = Search
kbAltF1 = Copyright
kbAltF2 = SaveAs
kbAltF3 = New
kbAltF4 = Close
kbAltH = FlipHiliting
kbAltJ = JumpCol
kbAltL = Lower
kbAltM = FlipType
kbAltLbracket = Unindent
kbAltMinus = FileList
kbAltRbracket = Indent
kbAltS = FlipBlockMode
kbAltU = Upper
kbBksp = Bksp
kbCtrlBksp = DelWordLeft
kbCtrlE = DelToEOL
kbCtrlIns = Copy
kbCtrlJ = JumpLine
kbCtrlL = SearchAgain
kbCtrlLeft = WordLeft
kbCtrlPgDown = FileEnd
kbCtrlPgUp = FileBegin
kbCtrlRight = WordRight
kbCtrlShiftL = SearchAgain
kbCtrlShiftLeft = WordLeftMark
kbCtrlShiftPgDown = FileEndMark
kbCtrlShiftPgUp = FileBeginMark
kbCtrlShiftRight = WordRightMark
kbCtrlT = DelWordRight
kbCtrlY = DelLine
kbCtrlH = HiliteSelect
kbDel = Del
kbDown = Down
kbEnd = End
kbEsc = Exit
kbF1 = HelpScreen
kbF2 = Save
kbF3 = Load
kbGrMinus = NextFile
kbGrPlus = PrevFile
kbHome = Home
kbIns = Ins
kbLeft = Left
kbPgDown = PgDn
kbPgUp = PgUp
kbRight = Right
kbShiftF3 = Sort
kbShiftDel = Cut
kbShiftDown = DownMark
kbShiftEnd = EndMark
kbShiftHome = HomeMark
kbShiftIns = Paste
kbShiftLeft = LeftMark
kbShiftPgDown = PgDnMark
kbShiftPgUp = PgUpMark
kbShiftRight = RightMark
kbShiftUp = UpMark
kbUp = Up
kbGrEnter = "\n"
kbAltD = InsDate
kbAltCtrl0 = MarkSet0
kbAltCtrl1 = MarkSet1
kbAltCtrl2 = MarkSet2
kbAltCtrl3 = MarkSet3
kbAltCtrl4 = MarkSet4
kbAltCtrl5 = MarkSet5
kbAltCtrl6 = MarkSet6
kbAltCtrl7 = MarkSet7
kbAltCtrl8 = MarkSet8
kbAltCtrl9 = MarkSet9
kbAlt0 = MarkGo0
kbAlt1 = MarkGo1
kbAlt2 = MarkGo2
kbAlt3 = MarkGo3
kbAlt4 = MarkGo4
kbAlt5 = MarkGo5
kbAlt6 = MarkGo6
kbAlt7 = MarkGo7
kbAlt8 = MarkGo8
kbAlt9 = MarkGo9
kbAltComma = FileBegin ,
Home "\n" Up,
"/*\n",
"** Module :" InsFileNameShort "\n",
"** Abstract :\n",
"**\n",
"** Copyright (C) Sergey I. Yevtushenko\n",
"**\n",
"** Log: " InsDate "\tCreated\n",
"**\n",
"*/\n"
kbAltPoint = Home "\n" Up,
"#ifndef __" InsFileNameShort WordLeft BkSp "_" End "\n",
"#define __" InsFileNameShort WordLeft BkSp "_" End "\n",
FileEnd End "\n" End,
"#endif /*__" InsFileNameShort WordLeft BkSp "_" End "*/\n",
Up Up End
kbF11 = MacroRecStart
kbF12 = MacroRecEnd
//
// REXX Macro functions
// Copyright (C) 1998 Vit Timchishin
//
kbAltT = { /* Mark word */
lastpos = 0
row=fedGet('r')
col=fedGet('c')
do ncol=col to 1 by -1
if fedGetChar(row,ncol,1)=' '
then leave;
end
do while fedGetChar(row,col,1)<>'00'x
if fedGetChar(row,col,1)=' '
then leave;
col=col+1
end
ncol=ncol+1
if ncol < col
then do
call fedSet 'C', ncol /* Goto to start of word */
call fedSet 'M', 0 /* unmark */
do while ncol < col
call fedRightMark
ncol=ncol+1
end
end
return
}
kbShiftTab = { /* Long tab */
if fedget('row')<>1 then
do
col=fedget('c');
row=fedget('row');
do while fedgetchar(row-1,col,1)=' ' &,
fedgetchar(row-1,col,1)<>'0'x
col=col+1
end
if fedgetchar(row-1,col,1)='0'x
then return;
call fedset 'col',col
end
}
kbShiftBkSp = { /* Smart back space */
col=fedget('c')
do row=fedget('row')-1 to 1 by -1
if fedgetchar(row,col-1,1)<>' ' then
do cl=col-1 to 1 by -1
if fedgetchar(row,cl,1)=' ' then
do
call fedset 'col',cl+1
return 0
end
end
call fedset 'col',1
end
}
//
// Jump List examples
// Copyright (C) 1999, Sergey I. Yevtushenko
kbShiftF7 = {
fedMsgBox(lst.jump_len)
fedOpenJumpList(2);
}
kbAltF7 = { /* Jikes Java compiler */
/* Using JumpList 2 */
address cmd
rc = fedSaveAll()
'nmake | rxqueue'
lst.jump_len=0
i=0
do while queued() > 0
parse pull str
parse value str with fname':'l1':'c1':'l2':'c2':'msg
if strip(fname)='' | l1='' | c1='' | l2='' | c2=''
then iterate;
if msg=''
then do
parse pull msg
msg=strip(msg)
end
lst.i.jump_header='('l1':'c1'):'msg
lst.i.jump_file=fname
lst.i.jump_row=l1
lst.i.jump_col=c1
i=i+1
end
lst.jump_len=i
rc = fedFillJumpList('lst',2);
rc = fedOpenJumpList(2);
}
kbShiftF8 = {
fedOpenJumpList(1);
}
kbAltF8 = { /* Borland make and Watcom C++ compiler */
/* Using JumpList 1 */
address cmd
rc = fedSaveAll()
'bmake | rxqueue'
lst.jump_len=0
i=0
do while queued() > 0
parse pull str
parse value str with fname'): 'msg
if strip(fname)='' | strip(msg)=''
then iterate;
parse value fname with fname'('arow'):'txt': (col'acol')'rest
lst.i.jump_header=str
lst.i.jump_file=fname
lst.i.jump_row=arow
lst.i.jump_col=acol
i=i+1
end
lst.jump_len=i
rc = fedFillJumpList('lst',1);
rc = fedOpenJumpList(1);
}
kbShiftF9 = {
fedOpenJumpList(0);
}
kbAltF9 = { /* IBM's NMAKE and Visual Age C++ compiler */
/* Using JumpList 0 */
address cmd
rc = fedSaveAll()
'nmake | rxqueue'
lst.jump_len=0
i=0
do while queued() > 0
parse pull str
parse value str with fname' : 'msg
if strip(fname)='' | strip(msg)=''
then iterate;
parse value fname with fname'('arow':'acol')'rest
lst.i.jump_header=str
lst.i.jump_file=fname
lst.i.jump_row=arow
lst.i.jump_col=acol
i=i+1
end
lst.jump_len=i
rc = fedFillJumpList('lst',0);
rc = fedOpenJumpList(0);
}
kbAltV = {
/* List of functions in file */
/* Using JumpList 9 */
fname=fedGet('Name');
lst.jump_len=0
i=0
do j = 1 to fedGet('Last')
str=fedGetChar(j)
chr=translate(left(str, 1))
if chr<'A' | chr > 'Z' | length(strip(str)) < 3
then iterate;
chr=translate(right(strip(str), 1))
if chr=';' | chr='=' | chr='{' | chr=']'
then iterate
lst.i.jump_header=str
lst.i.jump_file=fname
lst.i.jump_row=j
lst.i.jump_col=1
i=i+1
end
lst.jump_len=i
rc = fedFillJumpList('lst',9)
rc = fedOpenJumpList(9)
}
//----------------------------------------------------------------
// kbInit/kbDone pseudo keys.
//
// Sample kbInit/kbDone is simple 'project' manager
// if in current directory exist file 'fed.prj' then kbInit loads
// all files listed in 'fed.prj'. kbDone macro is used for saving
// list of all opened files into 'fed.prj' if 'fed.prj' exists
// in current directory.
//
// WARNING: Old 'fed.prj' is replaced and old content is lost!
//----------------------------------------------------------------
kbInit = { /* Load stored list of files opened last time */
/* Using 'fed.prj' in current directory */
fil=fedGet('Dir')||'fed.prj'
first=''
current=fedGet('N')
if stream(fil, 'c', 'query exists') = ''
then return;
do while lines(fil) > 0
str=strip(linein(fil))
if str<>''
then do
if first=''
then first=str
rc=fedOpenFile(str);
end
end
call stream fil, 'c', 'close'
if pos('.Untitled', current) = 0
then do
rc = fedMsgBox(current)
rc = fedOpen(current)
return 0;
end
if first=''
then return 0;
rc = fedMsgBox(current'<>'first)
rc = fedOpen(first)
}
kbDone = { /* Save opened files list */
/* Using 'fed.prj' in current directory */
fil=fedGet('Dir')||'fed.prj'
if stream(fil, 'c', 'query exists') = ''
then return;
address cmd
'del 'fil '>nul 2>nul'
handle=fedGet('Buffer') /* get current buffer handle */
do until handle=fedGet('Buffer')
call lineout fil, fedGet('Name') /* store file name into list*/
rc=fedNextFile() /* switch to next opended */
end
call stream fil, 'c', 'close'
}