POV-Ray : Documentation : 3.2.6.6 Configuring the Internal Editor
  POV-Ray 3.6 Documentation Online View  
3.2.6.5 Keyword Expansion and CodeList   3.2.6.7 The Language Setting

3.2.6.6 Configuring the Internal Editor

The built-in editor is extensively customizable. It utilizes syntax highlighting and understands .POV and .INC files as being in POV syntax. You can change the color settings used from the properties dialog (Alt + Enter). It also has built-in syntax highlighting for C, C++, Java, Basic, Pascal, SQL, HTML and XML.

3.2.6.6.1 Important Editor Notes

One important thing to note right away is that the editor properties dialog only allows you to set things that are implemented within the editor (remember, the editor is two components - a DLL called 'CodeMax', and another DLL [written by the POV-Team] which loads and 'wraps' it into POV-Ray for Windows). There are some other options implemented within the editor wrapper code in POV-Ray for Windows which are able to be accessed via the Editor menu (only visible when an editor is selected). For example, the keybinding for saving a file (Ctrl-S) is not listed in the editor properties since this function is handled by the wrapper code. You can't change this assignment.

Additionally, by design, some properties only affect the current file, and some affect all files. Also, most (but not all) of those that affect the current file will become the default for any new files opened after that point. This is by design. For example, changing the tab stop setting only affects the current file (leaving other opened files alone), but will then become the default for new files from that point on.

Some people have asked why the "don't ask again" option in the render save dialog is not persistent across sessions. This is by design and is not likely to change.

The edit window context menu has an option for 'show/hide message window'. This window - when displayed at the bottom of an editor window - is sizable. A quick way to close the message window is just to hit ESCAPE, or drag the divider down to within a few pixels of the bottom border - when you release the mouse, the message window will vanish.

You can also tell POVWIN not to display the message window automatically when starting a render. You do this from the Editor menu, by turning off 'Auto-Show Parse Messages'. This is most useful with the Error File option.

POVWIN will optionally automatically load a file in which a parse error has occurred into the editor (or select it if it's already loaded) and place the cursor on the line and column of the offending code. This is able to be turned on or off using the 'Auto-Load Error File' option in the Editor menu. Also, if this option is on, and the message window was displayed automatically (see above), it will be closed automatically rather than being left open. The text describing the error will be displayed in the status bar at the bottom of the window. Note that, occasionally, if the error occurs inside a macro, the displayed line/column for the error will be wrong (though this is uncommon).

3.2.6.6.2 Default Key Mappings

Listed below is the complete set of default keystrokes and the CodeMax command that each keystroke maps to. Note that many depend on caret position. If two sets of keystrokes are listed, either may be used (e.g. 'Copy' is defined as 'Ctrl + C or Ctrl + Insert', which means that you may use either 'Ctrl + C' or 'Ctrl + Insert' to perform a copy; whichever suits you. There is no difference between one or the other).

Note that if more than one key sequence is assigned to a command, and the command is one of those listed in the menus (not all commands are listed in the menus), the key sequence shown as the shortcut key in the menu is generally the shortest one (in terms of its printed representation).

You can change any of the below-mentioned key assignments if the defaults don't suit you. Additionally, the below table does not list the more than 50 commands for which there is no default key assignment. Use Alt + Enter on an editor screen, or select 'Codemax Properties' from the Editor menu to assign these.
BookmarkNext F2 Move to next bookmark
BookmarkPrev Shift + F2 Move to previous bookmark
BookmarkToggle Ctrl + F2 Place a bookmark
CharLeft Left Arrow Move caret left
CharLeftExtend Shift + Left Arrow Move caret left and highlight
CharRight Right Arrow Move caret right
CharRightExtend Shift + Right Arrow Move caret right and highlight
CodeList Ctrl + Space Show keywords (reference or insertion into file)
Copy Ctrl + C or Ctrl + Insert Copy selection to clipboard
Cut Ctrl + X or Shift + Delete Remove selection to clipboard
CutSelection Ctrl + Alt + W Remove selection (same as Cut)
Delete Delete Delete one character right (can Undo)
DeleteBack Backspace or Shift + Backspace Remove one character left (can Undo)
DocumentEnd Ctrl + End Move to end of file
DocumentEndExtend Ctrl + Shift + End Move to end of file and highlight
DocumentStart Ctrl + Home Move to start of file
DocumentStartExtend Ctrl + Shift + Home Move to start of file and highlight
Find Alt + F3 or Ctrl + F Find, or search
FindNext F3 Find next (specified)
FindNextWord Ctrl + F3 Find next (selected)
FindPrev Shift + F3 Find previous (specified)
FindPrevWord Ctrl + Shift + F3 Find previous (selected)
FindReplace Ctrl + Alt + F3 or Ctrl + H Find/Replace dialog
GoToLine Ctrl + G Move to a line number dialog
GoToMatchBrace Ctrl + ] Match brace }, bracket ], or parenthesis )
Home Home Move to start of line text (or line)
HomeExtend Shift + Home Move to start of line and highlight
IndentSelection Tab Indentation (number of spaces set in properties)
LineCut Ctrl + Y Remove current line
LineDown Down Arrow Move to next line
LineDownExtend Shift + Down Arrow Move to next line and highlight
LineEnd End Move to end of line text (or line)
LineEndExtend Shift + End Move to end of line and highlight
LineOpenAbove Ctrl + Shift + N Make new line above current line
LineUp Up Arrow Move to previous line
LineUpExtend Shift + Up Arrow Move to previous line and highlight
LowerCaseSelection Ctrl + U Change highlighted text to lower case
PageDown Page Dn Move down a page
PageDownExtend Shift + Page Dn Move down a page and highlight
PageUp Page Up Move up a page
PageUpExtend Shift + Page Up Move up a page and highlight
Paste Ctrl + V or Shift + Insert Place clipboard contents into file
Properties Alt + Enter CodeMax properties dialog
RecordMacro Ctrl + Shift + R Record/stop a macro
Redo Ctrl + Y Redoes last undone action (i.e. undo an undo)
SelectAll Ctrl + A Highlight entire file
SelectLine Ctrl + Alt + F8 Highlight the current line
SelectSwapAnchor Ctrl + Shift + X Switch place of caret with start of highlighting
SentenceCut Ctrl + Alt + K Remove a continuous line to clipboard
SentenceLeft Ctrl + Alt + Left Arrow Move to start of continuous line
SentenceRight Ctrl + Alt + Right Arrow Move to end of continuous line
SetRepeatCount Ctrl + R Number of times to do next command
TabifySelection Ctrl + Shift + T Change highlighted spaces to tabs
ToggleOvertype Insert Toggle between inserting and overwriting
ToggleWhitespaceDisplay Ctrl + Alt + T Show or hide spaces
Undo Ctrl + Z or Alt + Backspace Undo last change
UnindentSelection Shift + Tab Remove indentation of selected line
UntabifySelection Ctrl + Shift + Space Change highlighted tabs to spaces
UpperCaseSelection Ctrl + Shift + U Change highlighted text to upper case
WindowScrollDown Ctrl + Up Arrow Scroll file down, leaving caret
WindowScrollLeft Ctrl + Page Up Scroll file left, leaving caret
WindowScrollRight Ctrl + Page Dn Scroll file right, leaving caret
WindowScrollUp Ctrl + Down Arrow Scroll file up, leaving caret
WordDeleteToEnd Ctrl + Delete Delete a word from caret to end
WordDeleteToStart Ctrl + Backspace Delete a word from caret to start
WordLeft Ctrl + Left Arrow Move to start of current word
WordLeftExtend Ctrl + Shift + Left Arrow Move to start of current word and highlight
WordRight Ctrl + Right Arrow Move to end of current word
WordRightExtend Ctrl + Shift + Right Arrow Move to end of current word and highlight

3.2.6.6.3 Setting Key Mappings

Most of the keystrokes used by the editor are re-assignable - even those listed in the menus. (Some users have assumed that commands with shortcuts listed in the menus aren't assignable, but this isn't the case - if you change the assignment, the new shortcut shows up in the menu).

Each editor command can have up to two different keyboard actions assigned to it, and each keyboard action may have either one or two keystrokes. Most users will use only one keystroke, but those who are still familiar and comfortable with the old 'Wordstar' key assignments (e.g. Ctrl-Q, F for Find) will be pleased to discover that these are still available to them, should they want to take the time to assign them.

If you assign more than one key sequence to a command, and the command is one of those listed in the menus (not all commands are listed in the menus), the one that is listed in the menu as the shortcut key is generally the shortest one (in terms of its printed representation).

You can access the keystroke assignments via the CodeMax properties dialog. By default, this is mapped to Alt+Enter when an editor is displayed. Alternatively, you can get at it from the Editor menu (only visible when an editor is selected) or the editor right-mouse-button context menu.

3.2.6.6.4 Reserved Keys

Not all commands are assignable ! In general, only the commands that are directly implemented in the CodeMax editor DLL are able to be set. These commands are ones that relate to operations on individual edit buffers. They do not include such things as file operations (load, save, print, etc). These operations are implemented in the POVWIN editor wrapper code and are not managed or able to be changed by CodeMax. Therefore, it should be clear that you can neither change the key bindings for operations such as file save, nor use the POVWIN- assigned keystroke (e.g. Ctrl-S in the case of save) for any other purpose.

3.2.6.6.5 Using the Mouse

The editor supports the following mouse actions:
Left click over text Changes the caret position
Right click over open file Displays the pop-up menu
Left Button down over selection, hold and drag Moves text
Ctrl + Left Button down over selection, hold and drag Copies text
Left click over left margin Selects line
Left click over left margin, hold and drag up or down Selects multiple lines
Alt + Left Button down, hold and drag Select columns of text
Left double click over text Select word under cursor
Spin IntelliMouse (compatible) mouse wheel Scroll the window vertically
Single click IntelliMouse mouse wheel Select the word under the cursor
Double click IntelliMouse mouse wheel Select the line under the cursor
Click and drag splitter bar Split the window into multiple views
or adjust the current splitter position
Double click splitter bar Split the window in half into multiple views
or unsplit the window if already split

3.2.6.6.6 European Users and Match Brace

Several European users have commented that the default key assignment for 'Match Brace' (Ctrl-]) is not usable on their keyboards. Please note that you can change this to whatever you please (they assumed that it was not changeable when, in fact, it is).

Another thing to remember about the match brace command is that it only works if it is executed when the edit caret is on a brace character ('{', '}', '(', ')', '[', ']'). The caret will then jump to the matching character (e.g. if it's on a '(', it will jump to the matching ')').

3.2.6.6.7 Global vs. Local Options

It's important to understand that many of the options that are accessible via the CodeMax properties dialog (Alt + Enter by default), apply to the current file only. Some, however, apply to all files, and some apply to the current file and all new files opened after that point. Confused yet ? ;). We'll explain more.

In most cases it should be obvious whether an option is global or not. As a quick summary, the options in the 'Misc' tab of the CodeMax properties dialog are all global. The ones in the 'Language/Tabs' section are as explained above, except 'Convert tabs to spaces while typing', which is global, and 'Indent style', which is local and sets a new default. Those in the 'Color/Font' section are global. Finally, key assignments are obviously global to all editors (see the key assignment section above for caveats)

3.2.6.5 Keyword Expansion and CodeList   3.2.6.7 The Language Setting


Copyright 2003-2004 Persistence of Vision Raytracer Pty. Ltd.