*********************
*   Drag-and-Drop   *
*********************

Files can be dragged and dropped into FeatherPad windows.

Also tabs can be dragged from a window and dropped into another window or outside all FeatherPad windows. In the first case, the dropped tab will appear after the previously active tab; in the second case, a new window containing the dropped tab will be created, i.e. the tab will be detached.

NOTE: Tab DND is enabled only under X11 because, at least, Wayland has a serious issue related to DND.

************
*   Tabs   *
************

Tabs can be reordered or detached by the mouse.

If there is more that one tab, each one will have a right-click menu for closing its right or left tabs. With more than one tab, it is also possible to detach the active tab by clicking the related item on the File menu or with Ctrl+T.

If a file is opened in a tab, the right-click menu of that tab will also contain two items for copying the name and path of the file.

For users' comfort, double clicking on an empty area of the tab-bar creates a new tab.

***********************
*   File Management   *
***********************

If there is a FeatherPad window on the current virtual desktop or viewport, so that more than half of its width as well as its height is visible, files will be opened as new tabs in it; otherwise, a new window will be created. Also when the window on the current desktop/viewport has a modal dialog, another window is created.

In this way, FeatherPad is aware of virtual desktops under most Linux desktop environments. However, there are exceptions (like non-X11 environments or Enlightenment).

Files are always opened after the active tab unless it is empty, in which case the first file will be opened in it. If a single file is opened, its tab will be activated but in the case of multiple files, the active tab will not change.

If a file is opened multiple times, its second (third, ... ) instance will be uneditable by default and will have a light yellow or dark red background, depending on whether the default or the dark color scheme is used. To make it editable, click on the newly created 'Edit' button on the toolbar or the 'Edit' menu. After that, these two buttons will disappear again.

If the opened file is a symbolic link (symlink), the context menu of its tab will have two extra items for copying its target path and opening its target inside the current window.

Executable script files could be run from inside FeatherPad if the corresponding option is enabled in the Preferences dialog. Then also a Run button will appear on the tool bar and the File menu whenever needed. If no terminal command is used to run them, their output and error messages will be shown by a popup dialog.

FeatherPad remembers recently modified or opened files, depending on which option is enabled in the Preferences dialog. It can also open the files of the last window on a session startup. However, it has a more advanced session manager, which provides the user with options for saving a session and restoring or removing saved sessions at any time and without limit.

***********************************
*   Sessions and Side-Pane Mode   *
***********************************

Sessions can be saved and opened by using the Session Manager dialog. As mentioned above, there is no limit to the number of stored sessions. Each session can have any name and consist of any number of files. All files of a session are opened in the current FeatherPad window and their cursor positions are remembered.

FeatherPad also has a side-pane mode, which can be enabled either temporarily or with startup. It is most suitable for working with sessions because its file list is alphabetically ordered and can be filtered. Each pane item has a right-click menu, which contains menu-items for various jobs when there is more than one page. Items can also be removed by middle-clicking without being selected.

The side-pane mode does not have features provided by tabs -- for example, tab drag-and-drop is missing from it -- and conversely -- for example, tabs are not sorted and cannot be filtered -- but the side-pane and tab modes can be used interchangeably through the Side-Pane menu-item or its shortcut and also by middle-clicking an empty space inside the tab-bar or side-pane.

*******************************************
*   Encodings and Programming Languages   *
*******************************************

FeatherPad tries to guess encodings as well as programming languages (for syntax highlighting) when opening files. Although it often guesses encodings right, there is no exact way for that. Therefore, there are some encodings in the Options menu. If you choose one, the text could be saved with it by using the item "Save with Encoding" on the File menu. By default, all texts are saved with UTF-8.

The programming language is detected based on the mime type or file name and its syntax will be highlighted if the syntax highlighting is enabled and supports the language in question.

If the text has no programming language or its syntax is not supported, only its hyperlinks/URLs will be highlighted and it will be possible to open them by right clicking them and activating the related menu-item or by pressing the Control key, moving the cursor over them, and clicking them while the cursor is like a pointing hand.

Also, there is an option in the Preferences dialog that, if enabled and checked, will add a language button to the status bar for overriding the original syntax or lack of it. Reloading a document restores its original syntax.

There are also options for showing whitespaces (spaces, line ends and the document end) and vertical position lines when syntax highlighting is enabled (by default or temporarily).

*******************************
*   Searching and Replacing   *
*******************************

To remove the yellow highlights after finishing a search, you could

* Click on the 'Clear' icon of the search entry, or
* Press Ctrl+K while the search entry has focus, or
* Empty the search entry and press Enter or F3 in it, or
* Hide the search bar by focusing it and then, pressing Ctrl+F.

The 'Replace' docked window respects the settings for 'Match Case', 'Whole Word' and 'Regular Expression' on the search bar (in the last case, the matching text should be a regular expression, while the replacing text is always an ordinary string). It can be detached from and reattached to the main window at top or bottom. To remove the green highlights after replacing text, you could either hide/close the 'Replace' docked window or do as in the case of removing yellow search highlights (without closing the dock).

***********************
*   Going to A Line   *
***********************

The Jump bar can be shown by clicking its item on the toolbar or the Search menu. Jumping will happen after pressing Enter while the Jump spinbox is active. If the checkbox beside it is checked, all the text between the text cursor and the target line will be selected.

******************
*   Status Bar   *
******************

The status bar not only shows information about the opened file but can also contain other widgets when certain properties are enabled in the Preferences dialog. You could also hide it in the Preferences dialog, in which case, the item "Document Properties" will appear on the File menu and could show it temporarily.

***********************
*   Wheel Scrolling   *
***********************

For fast mouse wheel scrolling, put the cursor on the scrollbar. If it is inside the text view, the speed of wheel scrolling will be normal. If, in addition, the Shift key is pressed, the text will scroll one line per wheel turn.

"Inertial" scrolling can be enabled in the Text section of the Preferences dialog. It creates a kind of inertia with wheel scrolling when the cursor is inside the text view.

********************
*   Text Tabbing   *
********************

The (selected multi-line) text can be tabbed by the Tab key and untabbed by Shift+Tab.

If Ctrl+Tab is used, the tabulation will be done by 4 spaces instead of a tab (or the number of spaces that is set by the user in the related option of the Preferences dialog).

With Ctrl+Meta+Tab, the text will be tabbed by 2 spaces, while Shift+Meta+Tab is for 2-space untabbing as far as possible

********************
*   Auto-Bracket   *
********************

With "auto-bracketing" enabled in Preferences, if a left parenthesis, brace, square bracket or double-quote is typed, a right parenthesis, brace, square bracket or double-quote will respectively be inserted after it and the cursor will be moved between them, provided that the next character is not a letter or number. (Although double-quote is not a bracket and has identical left and right signs, it is included in this.)

Also if any part of the text is selected from end to start, typing of a left parenthesis, brace, etc. will add a right one after the selection end, so that the selection will be put inside parentheses, braces, etc.

For user convenience, if Enter/Return is pressed after a text selection is auto-bracketed by parentheses "(...)" or braces "{...}", the bracketed text will be put below the left bracket and above the right one.

The same holds for RTL (right-to-left) texts but with right and left reversed.

****************************
*   Ellipsis and Em Dash   *
****************************

By default and under proper circumstances, a triple period is replaced with an ellipsis and a double hyphen with an em dash (long dash), while the user is typing. This feature can be disabled in the Preferences dialog.

The proper circumstances depend on the pressed key and what comes before those characters. For example, in the case of a triple period, the Space or Enter/Return key should be pressed and the triple period should not follow a period.

**********************
*   Spell Checking   *
**********************

For spell checking, a Hunspell dictionary should be first added to Preferences → Text → Hunspell dictionary path (a Hunspell dictionary has the suffix ".dic" and should be accompanied by an affix file with the suffix ".aff"). Spell checking can be done by F2 but the shortcut can be customized.

If "Ignore All" is clicked, all instances of the word will be ignored during the current check. If you know that the word is correct, you could click "Add To Dictionary" and it will be saved for all checks. If "Correct All" is clicked, other instances of the word will be corrected in the same way when reached during the current check.

**************************
*   Keyboard Shortcuts   *
**************************

All shortcuts, except for the extra ones below, can be found on menus or as tooltips and many of them can be customized in the Preferences dialog.

Useful Extra (Hidden) Shortcuts:
=================================

Window:
*********
F11                 (Un-)Fullscreen
Ctrl+Shift+W        Resize window to fixed size (700x500 by default but can be set in Preferences)

Zooming:
**********
Ctrl+=              Zoom in (also Ctrl++ or Ctrl + mouse wheel)
Ctrl+-              Zoom out (also Ctrl + mouse wheel)
Ctrl+0              Reset zooming

Running a process:
********************
Ctrl+E              Run the executable file opened in this tab (only if enabled in Preferences)
Ctrl+Alt+E          Exit (kill) the above process immediately

Scrolling:
***********
Shift+Mouse Wheel   Scroll up/down by one wrapped line with mouse wheel
Ctrl+Up/Down        Scroll up/down by one wrapped line without moving text cursor

Moving text cursor:
********************
Up/Down             Go to the same position in the previous/next wrapped line
Home                Go to to the line start
End                 Go to to the line end
Ctrl+Home           Go to to the text start
Ctrl+End            Go to to the text end
Ctrl+Right/Left     Move the cursor one word to the right/left
Shift+Up/Down       Go to the same position in the previous/next wrapped line while selecting text
Meta+Up/Down        Go to the same position in the previous/next (real) line
Meta+Shift+Up/Down  Go to the same position in the previous/next (real) line while selecting text

Text tabulation:
*****************
Tab                 Ordinary text tabulation (its length can be changed in Preferences)
Shift+Tab           Backtab (the reverse of Tab)
Ctrl+Tab            4-space text tabulation (can be changed in Preferences)
Ctrl+Meta+Tab       2-space text tabulation
Shift+Meta+Tab      2-space Backtab, as far as possible

Text editing:
**************
Insert              Toggle overwrite mode
Delete              Delete to the right of the text cursor (the opposite of Backspace)
Ctrl+K              Delete to the end of the line (when the editor has focus)
Ctrl+Shift+Up/Down  Move the current line or selected lines upward/downward
Shift+Enter         Insert newline with the non-letter prefix of the current line
                    (to write code comments or lists easily, for example)
