PPTools/Guiguts/Guiguts 2 Manual/Help Menu

From DPWiki
Jump to navigation Jump to search


GUIGUTS VERSION 2 MANUAL

Describes features included in release 2.0.0 (July 2025)


Help Menu

Some of the topics on the Help menu link to online resources at DP, which will use your browser to display.

      • SCREENSHOT: Help menu
  • Guiguts Manual Contents -- Displays the Guiguts Manual Contents page.
  • Dialog Manual -- Displays the manual page for the dialog that most recently had focus. You can also use the F1 function key at any time to view the manual page for the current or most recently used dialog. Note that on some computers, the F1 key may default to another purpose (e.g. mute sound, or change screen brightness), in which case you will need to hold the fn key down while pressing F1.
  • About Guiguts -- displays a brief statement about the purpose and licensing of Guiguts as well as relevant version numbers. This information can be copied to the clipboard if it might be useful for reporting issues with the software.
  • Regex Quick Reference -- displays the section below with some help on common regex usage.
  • List of Compose Sequences -- displays a list of keyboard sequences that can be used to select and insert many Unicode characters by using the Compose Key. The first few lines of that list may look something like this:
      • SCREENSHOT: Compose Sequences Help Dialog
    • The above screenshot shows that pressing and releasing the Compose key, Ctrl+I, (Cmd+I on Macs) and typing into the dialog that pops up, either two spaces, or space-asterisk or asterisk-space will insert a non-breaking space; compose key followed by two exclamation marks inserts an inverted exclamation mark; to insert a cent symbol, use the compose key followed by C or c and the slash character, etc. There are hundreds of sequences pre-defined. With the exception of composing Greek, the order of the keys usually does not matter, and the keys have been chosen to hint at the character to be inserted in order to make them memorable.

Note that although the primary purpose of this dialog is to provide help on the compose sequences, you can click on any row in the dialog to insert the featured character. Clicking in the header row at the top will sort the dialog entries by the values in the column clicked, e.g. clicking on Name will sort the list alphabetically by name of character, and clicking Name again will sort in reverse order.

    • List of Main Compose Sequences (there are many more than these):
Characters to type Result
character and ` or \ character with grave accent
character and ' or / character with acute accent
character and ^ character with circumflex
character and " or : character with diaeresis/umlaut
character and ~, o, - character with tilde, ring, bar
+ and accent character Combining accent for when precomposed version not available
= and letter plain Greek letter
=, accent character(s) and letter accented Greek - use ( or ) first for breathing, | just before letter for iota subscript
- and space, or double - endash or emdash
^ and 1, 2 or 3 superscript for squared & cubed
* and character special/transformed character, e.g. *o for degree, *p for pilcrow, *. for middle dot
digit/digit fraction
<', >' or <", >" curly quotes
double space, or * and space non-breaking space

Command Palette

      • SCREENSHOT of Command Palette

Opened with Cmd+Shift+P or Ctrl+Shift+P, this dialog lists all the commands available in Guiguts, regardless of which, if any, menu they are contained in. This is helpful if you cannot remember which menu a feature is included in, or if you are working using the keyboard. You can type characters into the entry field to narrow down your search. For example, if you type "find", then those commands with "find" in their name will be moved to the top of the listing. You can also use the menu name to help you find commands. For example, typing "tools" will prioritize listing commands in the Tools menu. The list also remembers the 5 most recent commands used in the Command Palette, which appear above a separator line.

When you type a search string, the list is sorted as follows, in order of precedence:

  1. If a "recent" command contains the search string exactly, it will be shown in the "recent" section at the top.
  2. If a command begins with the search string, it will be shown next, with multiples sorted alphabetically.
  3. If a command contains the search string, it will be shown next, again with multiples sorted alphabetically.
  4. If the command's menu (assuming there is one) begins with the search string, that comes next.
  5. The remainder of the commands are sorted by a fuzzy matching algorithm. This algorithm means that even if you mistype "find" as "fimd", for example, which would otherwise not match any commands, the commands that contain "find" will appear at the top of the list.

Once you see the command you want to run, you can use down arrow to move down into the list and use up or down arrow to move through the list. When you see the command you want to run, you can run it with the Run button, by double clicking the command in the list, or by pressing the Return/Enter key.

User-defined Keyboard Shortcuts

      • SCREENSHOT of Command Edit dialog

Once the Command Palette described above has been opened, and a command selected, you can assign or re-assign keyboard shortcuts to the command. Some shortcuts are set up by default, such as Ctrl+F or Cmd+F to open the Search dialog. When the Command Edit dialog is shown, it will display the name of the command, and its menu if any. Some commands do not appear in a menu, but may be controls in a dialog, e.g. to toggle display of line numbers which is in the Preferences dialog.

Below the command and menu name is the area where the shortcut is defined. When you press the keys that you want to run the command, they will be displayed in the dialog. The base key can be letters A-Z or numbers 0-9, as well as most other keyboard characters that are available on a US/UK keyboard. In addition, you can use the Home/End keys, Page Up/Down keys, or the Insert key, if your keyboard has these available. Function keys F1 to F12 are also supported. If you try to use a function key as the base key and it does not appear to be recognized, try holding the "fn" key while you press the function key - read the paragraph below on Function Keys for further details.

You are not permitted to define single character keys as shortcuts without a modifier key (not including Shift). It would not make sense to use the plain letter "K" as a shortcut, for example, or you would be unable to type a "K" into your file. However, depending on which operating system you are using, you should be able to use Ctrl+K, Alt+K, Ctrl+Alt+K, Shift+Ctrl+K, Shift+Alt+K, Shift+Ctrl+Alt+K (Windows/Linux) or Ctrl+K, Cmd+K, Ctrl+Cmd+K, Shift+Ctrl+K, Shift+Cmd+K, Shift+Ctrl+Cmd+K (macOS).

If a key combination is used by the operating system for some other purpose, then you may find that it does not work in Guiguts, or it performs the OS action as well as the one you intended. If that happens, you need to choose a different combination.

You can reset all keyboard shortcuts to the Guiguts defaults in the Advanced tab of the Preferences dialog

Function Keys

On many systems the F-keys (F1, F2, etc.) have two possible roles: either they operate as an F-key, or they perform tasks such as changing volume or screen brightness. You can use the "fn" key with a key to switch between those behaviors. The default behavior will depend on your OS settings. If F2 by itself mutes sound, then fn+F2 will be recognized as the "F2" key. Or if you use fn+F2 to mute sound, then F2 by itself will be recognized as the F2 key. You may be able to switch behaviors by pressing and holding "fn", or by pressing "fn" with the "esc" key - again this is system dependent. For a function key to be used in Guiguts for shortcuts, it needs to perform its F-key role, not something like volume change, so depending on your default settings, you may need to use fn+F2 instead of F2, for example.

Keyboard Shortcuts

MAIN WINDOW

Unless stated otherwise, Mac users should use the <cmd> key instead of the <ctrl> key.

Note that many of the movement actions, such as arrow keys, Home/End or clicking with the mouse, can be combined with the Shift key to create or extend a selection. For example, in order to select a large range of text, e.g. the whole of an index, you can click at the start of the range, then Shift-click at the end of the range. Or if you have already made a selection, you can extend or reduce that selection by holding down Shift and using the arrow keys.

Shortcut Keys Action
<ctrl>+x cut
<ctrl>+c copy
<ctrl>+v paste
<ctrl>+a select all
<ctrl>+z undo
<ctrl>+y, <ctrl>+<shift>+z redo
<ctrl>+o open file
<ctrl>+s save file
<ctrl>+<shift>+s save as
<ctrl>+f open Search & Replace popup
<ctrl>+Home move cursor to the start of the text
<ctrl>+End move cursor to end of the text
<ctrl>+right arrow move to the start of the next word
<ctrl>+left arrow move to the start of the previous word
<ctrl>+up arrow move to the start of the current paragraph
Page Up (<fn>+up arrow on laptops/Macs) move up one screenful
Page Down (<fn>+down arrow on laptops/Macs) move down one screenful
<ctrl>+down arrow move to the start of the next paragraph
<shift>+Home (<cmd>+up arrow on Macs) adjust selection to beginning of current line
<shift>+End (<cmd>+down arrow on Macs) adjust selection to end of current line
<shift>+up arrow adjust selection up one line
<shift>+down arrow adjust selection down one line
<shift>+left arrow adjust selection left one character
<shift>+right arrow adjust selection right one character
<shift>+<ctrl>+Home adjust selection to the start of the text
<shift>+<ctrl>+End adjust selection to end of the text
<shift>+<ctrl>+left arrow adjust selection to the start of the previous word
<shift>+<ctrl>+right arrow adjust selection to the start of the next word
<shift>+<ctrl>+up arrow adjust selection to the start of the current paragraph
<shift>+<ctrl>+down arrow adjust selection to the start of the next paragraph
<ctrl>+1,2,3,4,5 (<ctrl> on Macs too) go to bookmark 1,2,3,4,5
<ctrl>+!,@,#,$,% (<ctrl> on Macs too).

On UK keyboard, !,",£,$,%.

These characters are Shift+1,2,3,4,5

set bookmark 1,2,3,4,5
Double-click left mouse button select word
Triple-click left mouse button select line
<shift>+click left mouse button adjust selection to click point
<shift>+double-click left mouse button adjust selection to include word clicked on
<shift>+triple-click left mouse button adjust selection to include line clicked on
<alt>+mouse drag (<option>+mouse drag on Macs) column select
<ctrl>+i compose character with keystrokes
<command>+q quit Guiguts (Mac only)


SEARCH POPUP

On Macs, use cmd key instead of ctrl below.


<Enter> -- Search
<shift>+<Enter> -- Replace
<ctrl>+<Enter> -- Replace & Search
<ctrl>+<shift>+<Enter> -- Replace & Search in reverse direction

PAGE SEPARATOR POPUP


j -- Join Lines - join lines, remove all blank lines, spaces, asterisks and hyphens
k -- Join, Keep Hyphen - join lines, remove all blank lines, spaces and asterisks, keep hyphen
b -- Blank Line - leave one blank line. Close up any other whitespace (paragraph break)
s -- New Section - leave two blank lines. Close up any other whitespace (section break)
c -- New Chapter - leave four blank lines. Close up any other whitespace (chapter break)
d -- Delete - delete the page separator. Make no other edits
r -- Refresh - search for, highlight and re-center the next page separator
u -- Undo - undo the last edit
e -- Redo - redo the last undo

Regular Expression Quick Reference

For the most part, Guiguts uses a standard python regex engine for searching. It does differ from standard for replacement assertions however.


LEGAL REGEX SEARCH ASSERTIONS

   \       Escapes the character immediately following it
   .       Matches any single character except a newline
   ^       Matches at the beginning of the string
   $       Matches at the end of the string
   *       Matches the preceding element 0 or more times
   +       Matches the preceding element 1 or more times
   ?       Matches the preceding element 0 or 1 times
   *?      Non-greedy match of preceding element 0 or more times
   +?      Non-greedy match of preceding element 1 or more times
   {...}   Specifies a range of occurrences for the element preceding it
   [...]   Matches any one of the characters contained within the brackets
   (...)   Groups subexpressions for capturing to \1, \2...
   |       Matches either the subexpression preceding or following it
   \1, \2 ...  The text from the Nth group


ESCAPE SEQUENCES

These work as in normal strings.

   \n       Newline
   \0__     Any octal ASCII value
   \x__     Any hexadecimal ASCII value
   \x{263a} A wide hexadecimal value
   \N{name} A named character


CHARACTER CLASSES

   [amy]    Match 'a', 'm' or 'y'
   [f-j]    Dash specifies "range". Match 'f','g','h','i', or 'j'
   [f-j-]   Dash escaped or at start or end means 'dash'. Match 'f','g','h','i', 'j' or '-'
   [^f-j]   Initial caret indicates "match any character _except_ these"

The following sequences work within or without a character class. The default character class equivalents are given.

   \d      A digit                     [0-9]
   \D      A nondigit                  [^0-9]
   \w      A word character            [a-zA-Z0-9_]
   \W      A non-word character        [^a-zA-Z0-9_]
   \s      A whitespace character      [ \t\n\r\f]
   \S      A non-whitespace character  [^ \t\n\r\f]

   \p{...} Match Unicode property
   \P{...} Match lack of Unicode property

Commonly used Unicode properties:

   \p{L}  or \p{Letter}            Any letter from any language
   \p{Ll} or \p{Lowercase_Letter}  A lowercase letter (ensure you have checked "Match case")
   \p{Lu} or \p{Uppercase_Letter}  An uppercase letter (ensure you have checked "Match case")
   \p{N}  or \p{Number}            Any kind of numeric character
   \p{P}  or \p{Punctuation}       any kind of punctuation character

Commonly used POSIX properties - there is some overlap between these and the Unicode properties above. For our purposes you may use whichever you prefer.

   [[:alnum:]]  or  \p{IsAlnum}    Alphanumeric
   [[:alpha:]]  or  \p{IsAlpha}    Alphabetic
   [[:digit:]]  or  \p{IsDigit}    Digits
   [[:lower:]]  or  \p{IsLower}    Lowercase chars (ensure you have checked "Match case")
   [[:punct:]]  or  \p{IsPunct}    Punctuation
   [[:upper:]]  or  \p{IsUpper}    Uppercase chars (ensure you have checked "Match case")


ANCHORS

All are zero-width assertions.

   ^  Match string start
   $  Match string end
   \b Match word boundary (between \w and \W)
   \B Match except at word boundary (between \w and \w or \W and \W)


QUANTIFIERS

Quantifiers are greedy by default -- match the longest leftmost.

   Maximal Minimal Allowed range
   ------- ------- -------------
   {n,m}   {n,m}?  Must occur at least n times but no more than m times
   {n,}    {n,}?   Must occur at least n times
   {n}     {n}?    Must occur exactly n times
   *       *?      0 or more times (same as {0,})
   +       +?      1 or more times (same as {1,})
   ?       ??      0 or 1 time (same as {0,1})

There is no quantifier {,n} -- that gets understood as a literal string.


EXTENDED CONSTRUCTS

   (?=...)          Zero-width positive lookahead assertion
   (?!...)          Zero-width negative lookahead assertion
   (?<=...)         Zero-width positive lookbehind assertion
   (?<!...)         Zero-width negative lookbehind assertion
   (?>...)          Grab what we can, prohibit backtracking


LEGAL REPLACEMENT TERM ASSERTIONS

   \n   New line
   \C   Evaluate as Python code until \E
   \E   End evaluation as code
   \1, \2 ...  hold the Nth expression captured in parentheses