(If you do not see the frame version of this page with a table of contents in the left frame, click here.)

Preferences

(Note: The preferences file is now coded in XML, and the following was written when it was coded as a standard Windows ini-file. All the XML element names have been kept the same with the exception that all names are now in lower-case. Otherwise, it should be easy to match the names and values given here with what you will find in the current version of the preferences file. I'll rewrite this when I can.)

Preferences are properties that control various aspects of farVIEW behaviour during a session. Preferences are stored in sections of the farview.ini file, which is in the farVIEW directory. You can edit the preferences using a standard text editor. You cannot edit the preferences using a farVIEW topic, which would be nice, because farVIEW loads the preferences at the beginning of a session, then writes them back out at the end of the session, so your work would just be overwritten. Nor can you edit the preferences with a text editor while farVIEW is running, for the same reason. The proper way to handle this, of course, is to  provide a tabbed preferences dialog within farVIEW, but, for now, there isn't one.

The various aspects of preferences is subject to change.

[Interface]

This section provides information to control some aspects of the appearance of the user interface.

discard=hide
Sets the state of the Discards topic to hidden (hide, show). This property is managed by farVIEW.

altIsCtrl=false
Distinguishes the Alt-key from the Ctrl-key (true, false). Set to true for the Mac version of farVIEW.

openLines=no
Sets the display style in the Contents window (yes, no). Displays lines and open/close box when set to yes.

opened=opened
Displays the opened.bmp file for the topic-opened state. Images used in this and the next five properties must be the same size in height and width.

closed=closed
Displays the closed.bmp file for the topic-closed state.

leaf=leaf
Displays the leaf.bmp file for leaf topics.

remoteopened=obook
Displays the obook.bmp file for remote topic-opened state.

remoteclosed=cbook
Displays the cbook.bmp file for remote topic-closed state.

remoteleaf=key
Displays the key.bmp file for remote leaf topics.

killFobs=no
Determines if fob-files are deleted at the beginning of a session when there are corresponding far-files. Ok, let me explain: a far-file is a farSlang source file, while a fob-file is a farSlang topic file. (If you are a programmer, this might make some sense.) This property is provided for the programmer's convenience while debugging, and insures that the latest version of the source of a farSlang module is used for testing.

[Comm]

This section provides information to farVIEW to control the behaviour of the communication functions.

active=yes
Sets the state of the Comm listener (yes, no). When set to no, farVIEW refuses requests from other computers.

maxsize=16384
Sets the size of a transfer block. This value must be the same for all farVIEW machines in a community. Do not change.

pause=10000
Sets the unit of time for comm waits, when message parts are expected but not yet received.

listenPort=8000
Sets the port on which to listen for request messages from other farVIEW machines.

userName=yourUserNameHere
Sets the user name. Temporary. Use this crude method of specifying your user name for now. I don't have the infrastructure worked out yet to support a sign-in..

[Books]

This section provides information that farVIEW needs to create and maintain farBooks. It is safe to change these values at any time as long as the values are reasonable. When you create a new farBook, farVIEW uses the current values.

myBook=mybook.vue
Associates the local mybook.vue file to the mybook farBook. Not required when using farVIEW in isolation; i.e., when comm=no. But, if comm=yes, and a remote user attempts to access mybook using the URL far://yourIP:port/myBook, you must have this property set. You need a corresponding property for each farBook that you share with remote users. You also need to add a section to the farview.ini file for each shared farBook to control remote users' access of that farBook. For more information, see the discussion about the Exposure topic property.

sizes=100,100,60,40,20,10,5,1
Sets the percentage of extra space to be allocated to content blocks when updating a content block in a farBook. When you create content, farVIEW allocates space in the farBook to hold the content text by computing an excess using the percentage in the table corresponding to the size range within which the text fits. Each entry in the table corresponds to a range of sizes according to the following table:
 

range
extent
1
0 - 256
2
257  - 1024
3
1025 -  4096
4
4097 - 16384
5
16385 - 65536
6
65537 - 262144
7
262145 - 1048576
8
1048577 - 4194304

The first percentage (100 percent in the example) represents the amount of extra space to allocate for content blocks that are from zero to 256 bytes in length. The second percentage (100 percent in the example) represents the amount of extra space to allocate for blocks that are from 257 to 1024 bytes in length. For example, if a content block is 400 bytes in length, then 800 bytes will be allocated to the block.

After you update a given content block, farVIEW checks the new size. If the new size fits within the same range as the old size, or is in a smaller range, then farVIEW reuses the previous allocated space to store the updated block. If the new size fits a larger range, then a new space size is computed according to the table, the new space is allocated, and the updated block is stored in the new space.

numberParts=2
Internal farVIEW parameter setting. Do not change.

numberHashSlots=4
Sets the size of a hash sub-table in the dictionary of a new farBook. Could range from 4 to 32 (just a guess). Without instrumentation and an understanding of the structure of the dictionary, you probably cannot make a useful judgement of an optimum value for a given farBook. At this time, no instrumentation is available.

numberReferenceSlots=4
Sets the size of a reference sub-table in the dictionary of a new farBook. Could range from 4 to 32 (just a guess). Without instrumentation and an understanding of the structure of the dictionary, you probably cannot make a useful judgement of an optimum value for a given farBook. At this time, no instrumentation is available.

sizeKey=48
Sets the maximum size of a keyword or phrase for the dictionary of anew farBook. 48 is relatively small. Could be as high as 100 or more, though that would waste a lot of space for most keys. This is a question of trade-offs between the amount of accuracy you want in your searches versus the amount of space that you waste for most keywords.

[Paths]

This section identifies the directories where you want farVIEW to store files that it receives, depending on their extensions.This is not yet supported.

doc=C:\My Documents
cpp=C:\projects\farview
mp3=C:\Mp3

[Windows]

This section provides default information about where to display windows, their size, and the font to use within them.

tree=937,201,303,440
Sets the initial position and size of the Contents window. If you move/resize the Contents window during a session, farVIEW updates this property to reflect that.

text=500,0,640,480
Sets the initial position and size of the text edit window. If you move/resize the window during a session, farVIEW does not update this property. Instead, it saves the information as the Where and Rect properties of the specific topic whose content window you moved.

font=Courier New,0,0,15
Sets the font properties of the Contents window. The default is the System font.

textFont=Courier New,0,0,13
Sets the default font properties of the topic content window. If the Font property of a topic has a value, then that is used over this property. The default is the System font.

[Manifest]

This section specifiies the topic properties to be used by farVIEW when it creates a new farBook. The [Manifest] section is explained in the Topic Properties page.

Name=text
Title=text
Source=text
Form=filename
Class=
FirstDate=date
LastDate=date
Owner=text
Password=text
Exposure=text
Where=105,36
Rect=500,0,640,480
Font=BrendensHand,0,0,19
Wrap=wrap

[Editor]

This section specifies some information to control the behaviour of the farVIEW text editor.

Wrap=no
Sets the default word wrap mode for the text editor.

The Keyboard

The farVIEW text editor allows sequences of one or more keys to be associated with sequences of one or more editor commands.

To make the association within an ini-file format, farVIEW provides two sections: the [EditorKeys] section to identify the key sequences, and the [EditorCommands] section to identify the command sequences.

The [EditorKeys] Section

Each entry in the [EditorKeys] section identifies one key sequence. The format of the entry is

    name=value

(which is standard ini-file format.) The name part identifies the associated command sequence and must match the name of some command entry in the [EditorCommands] section. More than one entry in the [EditorKeys] section can have the same name. In other words, you can use more than one key sequence to invoke a particular editor command.

The value part, in turn, contains two parts: the first part is the key sequence, and the second part is a flag to indicate if the key sequence can be used when the editor is disabled; i.e., when the user is just browsing. The two parts are separated by the "|" (pipe) character. See the examples below.

The first value sub-part, the key sequence, is a string of zero or more modifier key names followed by key names, each name separated from the others by commas.

The modifier key names are
 

Name
Meaning
@
Alt key down
^
Control key down
#
Option key down (Mac kybd)
$
Shift key down

The non-modifier keys are represented as themselves if they are from the standard printable ASCII characters A-Z, a-z,  0-9, or the special characters (!, %, etc). If they are not printable, for example, the Home key, then they have names as specified in the Key Name table given below.

Some examples of valid key sequence entries are

    backSpace     = ^,H|notNav
    copyBlock     = @,C
    leftTab       = ^,Q,Q|notNav
    pasteBlock    = @,Nsrt|notNav
    replaceString = ^,Q,A|notNav

As suggested in the examples, the edit-only indicator part must be included only when the key sequence is to be disabled when the editor is disabled. The first character of the indicator must be the letter "N". The remaining characters are ignored.

You can find many more examples in the farview.ini file in the [EditorKeys] and [EditorCommands] sections. Note that case is ignored.

The [EditorCommands] Section

Each entry in the [EditorCommands] section identifies one command sequence. The format of the entry is

   name=value

(which is standard ini-file format.) The name part identifies the command sequence and should be unique within the [EditorCommands] section. It should match one or more entries in the [EditorKeys] section. Additional entries with the same name are ignored.

The value part contains a list of the editor commands, separated by commas, that specify the behaviour of the corresponding key entry(s) in the [EditKeys] section. The names of the editor commands are given below in the farVIEW Editor Commands table.

farVIEW Key Names

Excluding the function keys F1-F24, the standard printable ASCII characters A-Z, a-z, 0-9, and the special characters ($, *, etc), the
following table specifies the name and value for each key that farVIEW recognizes.
 
Key Name
Meaning
bs
Back space
cr
Enter
esc
Escape
sp
Space
Home
Home
Up
Up arrow
PgUp
Page up
Left
Left arrow
Center
Center key
Right
Right arrow
End
End
Down
Down arrow
PgDn
Page down
Insert
Insert
Delete
Delete

farVIEW Editor Commands

The following table specifies the name and value for each editor command that farVIEW supports. (Some entries are marked "TBD." These entries represent editor commands that have not yet been implemented.)
 
Command Name
Meaning
editState
TBD
tabAlign
TBD
overWrite
Toggle between overwrite and insert modes
toggleLine
TBD
toggleWrap
Toggle word wrap feature on and off
toggleRepeat
TBD
printList
Print the full document
clearMacros
Clear the in-memory macro library
loadMacros
Load the in-memory macro library from a file
saveMacros
Save the in-memory macro library to a file
execMacro
Execute a macro
defineMacro
Define a macro
gotoEdLine
Advance the caret to the specified line
gotoEdCol
Advance the caret to the specified character
topOfBuffer
Move the caret to the top of the edit buffer
bottomOfBuffer
Move the caret to the bottom of the buffer
upPage
Move the caret up one page
downPage
Move the caret down one page
topOfPage
Move the caret to the top of the page
bottomOfPage
Move the caret to the bottom of the page
upLine
Move the caret up one line
downLine
Move the caret down one line
scrollUp
Move the window up one line in the text
scrollDown
Move the window down one line in the text
firstInLine
Move the caret to the first character in the line
lastInLine
Move the caret to the last character in the line
leftTab
Move the caret left one tab stop
rightTab
Move the caret right one tab stop
leftWord
Move the caret left one word
rightWord
Move the caret right one word
leftChar
Move the caret left one character
rightChar
Move the caret right one character
findString
Find the specified string
replaceString
Replace a matching string with another string
repeatFind
Repeat the last find or replace command
markBlockBegin
Mark the caret position as the beginning of the block
markBlockEnd
mark the caret position as the end of the block
jumpBlockBegin
Move the caret to the beginning of the block
jumpBlockEnd
Move the caret to the end of the block
copyBlock
Copy the marked block into the Clipboard
pasteBlock
Paste the Clipboard contents to the caret position
deleteBlock
Delete the marked block
readBlock
Read a file and insert it at the caret position
writeBlock
Write (Append) the marked block to a file
printBlock
Print the marked block
joinLines
Join the next line to the line at the caret position
deleteLine
Delete the line at the caret position
deleteRestOfLine
Delete from the caret position to the end of the line
deleteWord
Delete the word at the caret position
backSpace
Delete the character left of the caret position
deleteChar
Delete the character right of the caret position
insertLine
Insert an empty line following the line at the caret position
split
Make a new line of the text right of the caret position
leftJust
Move the text left of the caret position to the left margin TBD
centerJust
Center the text on the line at the caret position TBD
rightJust
Move the text right of the caret position to the right margin TBD
unDoDamage
TBD
unDoDelete
TBD