home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR36
/
KEXX.ZIP
/
RINDENT.KML
< prev
next >
Wrap
Text File
|
1989-12-20
|
4KB
|
179 lines
*
* Regular autoindenting support - Move the left margin with the TAB keys
*
:TAB
* Tab one stop forward and set left margin to resultant column
'Editv Getf Regular'; If Regular = "" Then Regular = 0
If Prefix()
Then Do
'SOS TabFieldF'
Exit
End
'SOS Tab'
If Regular
Then
'Set Margins' Cursor.4() '*'
Exit
:S-TAB
* Tab one stop backward and set left margin to resultant column
'Editv Getf Regular'; If Regular = "" Then Regular = 0
If Prefix()
Then Do
'SOS TabFieldB'
Exit
End
If First()
Then
'SOS TabB'
Else Do
'SOS TabB'
If Regular
Then
'Set Margins' Cursor.4() '*'
End
Exit
:C-TAB
* Move one tab stop backward and drag line (or block) contents along
* Left margin is set to final tab stop
'Editv Getf Regular'; If Regular = "" Then Regular = 0
If \Regular
Then
Exit
If First()
Then Do
* Do not drag the line back through first column
'SOS TabB'
Exit
End
'SOS TabB'
'Set Margins' Cursor.4() '*'
If (Block()) & (Block.1() = "LINE")
Then Do
If (Block.2() = Cursor.3())
Then Do
* Shift the entire block if cursor in first block line
'SOS FirstChar'
Old = Cursor.4()
'SOS MarginL'
New = Cursor.4()
If New < Old
Then
'Shift Left' (Old - New) 'Block'
If New > Old
Then
'Shift Right' (New - Old) 'Block'
End
Else
'LeftAdjust'
End
Else
'LeftAdjust'
Exit
:A-TAB
* Move one tab stop forward and drag line (or block) contents along
* Left margin is set to final tab stop
'Editv Getf Regular'; If Regular = "" Then Regular = 0
If \Regular
Then
Exit
'SOS Tab'
'Set Margins' Cursor.4() '*'
If (Block()) & (Block.1() = "LINE")
Then Do
If (Block.2() = Cursor.3())
Then Do
* Shift the entire block if cursor in first block line
'SOS FirstChar'
Old = Cursor.4()
'SOS MarginL'
New = Cursor.4()
If New < Old
Then
'Shift Left' (Old - New) 'Block'
If New > Old
Then
'Shift Right' (New - Old) 'Block'
End
Else
'LeftAdjust'
End
Else
'LeftAdjust'
Exit
:C-I
* INDENT function - sets left margin to the current cursor position
'Editv Getf Regular'; If Regular = "" Then Regular = 0
If \Regular
Then
Exit
'Set Margins' Cursor.4() '*'
Exit
:C-U
* UNDENT function - undoes left margin setting and returns cursor to column 1
'Editv Getf Regular'; If Regular = "" Then Regular = 0
If \Regular
Then
Exit
'Set Margins 1 *'
'SOS MarginL'
Exit
:C-HOME
* Move the current line (block) and the left margin setting to the current
* cursor position
'Editv Getf Regular'; If Regular = "" Then Regular = 0
If \Regular
Then
Exit
'Set Margins' Cursor.4() '*'
If (Block()) & (Block.1() = "LINE")
Then Do
If (Block.2() = Cursor.3())
Then Do
* Shift the entire block if cursor in first block line
'SOS FirstChar'
Old = Cursor.4()
'SOS MarginL'
New = Cursor.4()
If New < Old
Then
'Shift Left' (Old - New) 'Block'
If New > Old
Then
'Shift Right' (New - Old) 'Block'
End
Else
'LeftAdjust'
End
Else
'LeftAdjust'
Exit