KrViewer: Krusader's internal viewer-editor

Pressing Enter on a selected file opens the file with the associated application. The editor-viewer is tabbed, configure it on the Konfigurator General page

Viewer

To view a file as fast as possible according to its type, just put it under the cursor and press F3. Krusader's internal viewer is actually a part of Konqueror, which can basically view every file type viewable by Konqueror (e.g. display pictures, play music, show the content of an archive). This is called the 'Generic viewer', for which you need to configure the MIME types.

The viewer works as follows:

  • It tries to view the file with the 'Generic viewer'.

  • When the file type (MIME type) cannot be determined or when a file (e.g. a binary) does not have an associated action, it disables the 'generic viewer'. The file is treated as a text file, which is the 'Text viewer'.

  • The user can change in the KrViewer menu between: 'Generic viewer' (if available), 'Text viewer' and 'Hex viewer'.

You can configure the default viewer mode on the Konfigurator General page .

Shift+F3 views a URL on demand, e.g.:

  • man:/ views the manpages.

  • man:/krusader views manpage of Krusader.

  • info:/ views the infopages.

  • https://krusader.org views a webpage.

  • ftp://ftp.kde.org/pub/kde/ views a FTP server.

  • sftp://sftp.foo/ views a secure FTP server.

  • file:/home/frank views the home directory of Frank.

  • tar:/home/frank/archive.tar.gz/ opens content browser window for the tar.gz archive.

KrViewer can have the following menus: File, Edit, View, Settings and Krviewer, depending on which file type is viewed. They will be discussed in the Editor section. The internal viewer can follow links on HTML pages. With Ctrl+Shift+E the viewer can start Krusader's internal editor (which is basically the same application).

Note

The embedded viewer is not written by us, it is supplied via KF5 and KIO Slaves. We cannot and do not want to change it, using these libraries reduces the amount of written code. So we do not have to reinvent the wheel ;-)

Editor

Krusader's internal editor has almost everything that you can expect of an editor. Editing is similar to viewing but with the F4 key. The default editor is Krusader's internal editor. You can change the default editor in the Konfigurator General page, if you prefer to use an external editor.

Tip

When you use Krusader's internal editor for the first time, it is recommended to look at each section of the Settings menu, and configure it the way you want it.

Menu overview

There are different menus and menu items in simple and advanced mode. The advanced mode is enabled by checking the option Enable power user mode (KDE 3 mode) on the Appearance page in Krusaders settings.

The File Menu

FileSave (Ctrl+S)

This saves the current document. If there has already been a save of the document then this will overwrite the previously saved file without asking for the user's consent. If it is the first save of a new document the save as dialog (described below) will be invoked.

FileSave As...

This allows a document to be saved with a new file name.

FileReload (F5)

Reloads the active file from disk. This command is useful if another program or process has changed the file while you have it open in Krusader.

FilePrint... (Ctrl+P)

Opens a simple print dialog allowing the user to specify what, where, and how to print.

FileExport as HTML

Export your file in HTML format so your document can be viewed as a web page. This item is only displayed when the plugin Exporter is loaded.

The Edit Menu

EditUndo (Ctrl+Z)

This is used to eliminate or reverse the most recent user action or operation.

EditRedo (Ctrl+Shift+Z)

This will reverse the most recent change (if any) made using Undo

EditCut (Ctrl+X)

This command deletes the current selection and places it on the clipboard. The clipboard is a feature that works invisibly to provide a way to transfer data between applications.

EditCopy (Ctrl+C)

This copies the currently selected text to the clipboard so that it may be pasted elsewhere. The clipboard is a feature that works invisibly to provide a way to transfer data between applications.

EditPaste (Ctrl+V)

This will insert the contents of the clipboard at the cursor position. The clipboard is feature that works invisibly to provide a way to transfer data between applications.

EditCopy as HTML

This copies the currently selected text to the clipboard as HTML. This item is only displayed when the plugin Exporter is loaded.

EditSelect All (Ctrl+A)

This will select the entire document. This could be very useful for copying the entire file to another application.

EditDeselect (Ctrl+Shift+A)

Deselects the selected text in the editor if any.

EditBlock Selection Mode (Ctrl+Shift+B)

Toggles Selection Mode. When the Selection Mode is BLOCK, you can make vertical selections, e.g. select column 5 to 10 in lines 9 to 15. The status bar shows the current state of the Selection Mode, either BLOCK or LINE.

EditVI input Mode (Meta+Ctrl+V)

Switch to a vi-like, modal editing mode. This mode supports the most used commands and motions from vim's normal and visual mode and has an optional vi mode statusbar. This status bar shows commands while they are being entered, output from commands and the current mode.The behavior of this mode can be configured in the Vi Input Mode section of the Editing page in Krusader's settings dialog.

EditOverwrite Mode (Ins)

Toggles the Insert/Overwrite modes. When the mode is INS, you insert characters where the cursor is. When the mode is OVR, writing characters will replace the current characters if your cursor is positioned before any character. The status bar shows the current state of the Overwrite Mode, either INS or OVR.

EditFind... (Ctrl+F)

This opens the incremental search bar at the bottom of the editor window. On the left side of the bar is a button with an icon to close the bar, followed by a small text box for entering the search pattern.

When you start entering characters of your search pattern, the search starts immediately. If there is a match in the text this is highlighted and the background color of the entry field changes to light green. If the search pattern does not match any string in the text, this is indicated by a light red background color of the entry field and Not found is displayed at the right side of the bar.

Use the Next or Previous button to jump to the next or previous match in the document.

You can choose whether the search should be case sensitive. Selecting Match Case will limit finds to entries that match the case (upper or lower) of each of the characters in the search pattern.

Click on the button with a green arrow icon at the right side of the incremental search bar to switch to the power search and replace bar.

EditFind Next (F3)

This repeats the last find operation, if any, without calling the incremental search bar.

EditFind Previous (Shift+F3)

This repeats the last find operation, if any, without calling the incremental search bar, and searching backwards instead of forwards through the document.

EditReplace... (Ctrl+R)

This command opens the power search and replace bar. On the upper left side of the bar is a button with an icon to close the bar, followed by a small text box for entering the search pattern.

You can control the search mode by selecting Plain text, Whole words, Escape sequences or Regular expression from the drop down box.

If Escape sequences or Regular expression are selected, the Add... menuitem at the bottom of the context menu of the text boxes will be enabled and allows you to add escape sequences or regular expression items to the search or replace pattern from predefined lists.

Use the Next or Previous button to jump to the next or previous match in the document.

Enter the text to replace with in the text box labeled Replace and click the Replace button to replace only the highlighted text or the Replace All button to replace the search text in the whole document.

You can modify the search and replace behavior by selecting different options at the bottom of the bar. Selecting Match Case will limit finds to entries that match the case (upper or lower) of each of the characters in the search pattern. Selection Only will search and replace within the current selection only. The Find All button highlights all matches in the document and shows the number of found matches in a small popup.

Click on the button with a green arrow icon at the right side of the power search and replace bar to switch to the incremental search bar.

EditFind Selected (Ctrl+H)

Finds next occurrence of selected text.

EditFind Selected Backwards (Ctrl+Shift+H)

Finds previous occurrence of selected text.

EditGo to Line... (Ctrl+G)

This opens the goto line bar at the bottom of the window which is used to have the cursor jump to a particular line (specified by number) in the document. The line number may be entered directly into the text box or graphically by clicking on the up or down arrow spin controls at the side of the text box. The little up arrow will increase the line number and the down arrow decrease it. Close the bar with a click on the button with an icon on the left side of the bar.

The View Menu

The View menu allows you to manage settings specific to the active editor, and to manage frames.

ViewNew Window

Create another window containing the current document. All changes to the document in one window are reflected in the other window and vice versa.

ViewSwitch to Command Line (F7)

Displays the Katepart command line at the bottom of the window. In the command line, type help to get help and help list to get a list of commands.

ViewShow the Javascript Console

This opens a tool view that allows you to run Javascript code interactively. For more information, see Extending Kate with Scripts

ViewSchema

Select a font schema.

ViewDynamic Word Wrap (F10)

The text lines will be wrapped at the view border on the screen.

ViewDynamic Word Wrap Indicators

Choose when and how the dynamic word wrap indicators should be displayed. This is only available if the Dynamic Word Wrap option is checked.

ViewShow Static Word Wrap Marker

If this option is checked, a vertical line will be drawn at the word wrap column as defined in the SettingsConfigure Editor... in the Editing tab. Please note that the word wrap marker is only drawn if you use a fixed pitch font.

ViewShow Icon Border (F6)

This is a toggle item. Setting it on checked will make the Icon Border visible in the left side of the active editor, and vice versa. The Icon Border indicates the positions of the marked lines in the editor.

ViewShow Line Numbers (F11)

This is a toggle Item. Setting it on checked will make a pane displaying the line numbers of the document visible in the left border of the active editor, and vice versa.

ViewShow Scrollbar Marks

If this option is checked, the view will show marks on the vertical scrollbar. The marks are equivalent to the marks on the Icon Border.

ViewShow Folding Markers (F9)

If this option is checked, the marks for code folding will be shown.

ViewCode Folding

These options pertain to code folding:

Show Folding Markers (F9)

Toggles the display of the folding marker pane in the left side of the view.

Fold Current Node

Collapse the region that contains the cursor.

Unfold Current Node

Expand the region that contains the cursor.

Fold Toplevel Nodes (Ctrl+Shift+-)

Collapse all toplevel regions in the document. Click on the right pointing triangle to expand all toplevel regions.

Enlarge Font

This increases the display font size.

Shrink Font

This decreases the display font size.

The Bookmarks Menu

BookmarksSet Bookmark (Ctrl+B)

Sets or removes a bookmark in the current line of the active document. (If it is there, it is removed, otherwise one is set).

BookmarksClear All Bookmarks

This command will remove all the markers from the document as well as the list of markers which is appended at the bottom of this menu item.

BookmarksPrevious (Alt+PgUp)

This will move the cursor to beginning of the first above line with a bookmark. The menuitem text will include the line number and the first piece of text on the line. This item is only available when there is a bookmark in a line above the cursor.

BookmarksNext (Alt+PgDown)

This will move the cursor to beginning of the next line with a bookmark. The menuitem text will include the line number and the first piece of text on the line. This item is only available when there is a bookmark in a line below the cursor.

At the bottom of this menu, a list of bookmarks appears if any bookmarks are available for this window.

The Tools Menu

ToolsRead Only Mode

Set the current document to Read Only mode. This prevents any text addition and any changes in the document formatting.

ToolsMode

Choose the filetype scheme you prefer for the active document. This overwrites the global filetype mode set in SettingsConfigure Editor... in the Filetypes tab for your current document only.

ToolsHighlighting

Choose the Highlighting scheme you prefer for the active document. This overwrites the global highlighting mode set in SettingsConfigure Editor... for your current document only.

ToolsIndentation

Choose the style of indentation you want for your active document. This overwrites the global indentation mode set in SettingsConfigure Editor... for your current document only.

ToolsEncoding

You can overwrite the default encoding set in SettingsConfigure Editor... in the Open/Save page to set a different encoding for your current document. The encoding you set here will be only valid for your current document.

ToolsEnd of Line

Choose your preferred end of line mode for your active document. This overwrites the global end of line mode set in SettingsConfigure Editor... for your current document only.

ToolsAdd Byte Mark Order (BOM)

Checking this action you can explicitly add a byte order mark for unicode encoded documents. The byte order mark (BOM) is a Unicode character used to signal the endianness (byte order) of a text file or stream, for more information see Byte Order Mark.

ToolsInvoke Code Completion (Ctrl+Space)

Manually invoke command completion, usually by using a shortcut bound to this action.

ToolsWord Completion

Reuse Word Below (Ctrl+9) and Reuse Word Above (Ctrl+8) complete the currently typed text by searching for similar words backward or forward from the current cursor position. Shell Completion pops up a completion box with matching entries.

ToolsAutomatic Spell Checking (Ctrl+Shift+O)

When Automatic Spell Checking is enabled, wrong text is underlined in the document on-the-fly.

ToolsSpelling...

This initiates the spellchecking program - a program designed to help the user catch and correct any spelling errors. Clicking on this entry will start the checker and bring up the speller dialog box through which the user can control the process. There are four settings lined up vertically in the center of the dialog with their corresponding labels just to the left. Starting at the top they are:

Unknown word:

Here, the spellchecker indicates the word currently under consideration. This happens when the checker encounters a word not in its dictionary - a file containing a list of correctly spelled words against which it compares each word in the editor.

Replace with:

If the checker has any similar words in its dictionary the first one will be listed here. The user can accept the suggestion, type in his or her own correction, or choose a different suggestion from the next box.

Language:

If you have installed multiple dictionaries, here you can select which dictionary/language should be used.

On the right side of the dialog box are 6 buttons that allow the user to control the spellcheck process. They are:

Add to Dictionary

Pressing this button adds the Unknown word to the checker's dictionary. This means that in the future the checker will always consider this word to be correctly spelled.

Suggest

The checker may list here a number of possible replacements for the word under consideration. Clicking on any one of the suggestions will cause that word to be entered in the Replace with box, above.

Replace

This button has the checker replace the word under consideration in the document with the word in the Replace with box.

Replace All

This button causes the checker to replace not only the current Unknown word: but to automatically make the same substitution for any other occurrences of this Unknown word in the document.

Ignore

Activating this button will have the checker move on without making any changes.

Ignore All

This button tells the checker to do nothing with the current Unknown word: and to pass over any other instances of the same word.

Note

This only applies to the current spellcheck run. If the checker is run again later it will stop on this same word.

Three more buttons are located horizontally along the bottom of the spellcheck dialog. They are:

Help

This invokes the KDE help system with the help page for this dialog.

Finished

This button ends the spellcheck process, and returns to the document.

Cancel

This button cancels the spellcheck process, all modifications are reverted, and you will return to your document.

ToolsSpelling (from cursor)...

This initiates the spellchecking program but it starts where your cursor is instead of at the beginning of the document.

ToolsSpellcheck Selection...

Spellchecks the current selection.

ToolsChange Dictionary

Displays a drop down box with all available dictionaries for spellchecking at the bottom of the editor window. This allows easy switching of the spellcheck dictionary e.g. for automatic spellcheck of text in different languages.

ToolsClean Indentation

This cleans the indentation for the current selection or for the line the cursor is currently in. Cleaning the indentation ensures that all your selected text follows the indentation mode you choose.

ToolsAlign

Causes a realign of the current line or selected lines using the indentation mode and indentation settings in the document.

ToolsComment (Ctrl+D)

This adds one space to the beginning of the line where the text cursor is located or to the beginning of any selected lines.

ToolsUncomment (Ctrl+Shift+D)

This removes one space (if any exist) from the beginning of the line where the text cursor is located or from the beginning of any selected lines.

ToolsUppercase (Ctrl+U)

Put the selected text or the letter after the cursor in uppercase.

ToolsLowercase (Ctrl+Shift+U)

Put the selected text or the letter after the cursor in lowercase.

ToolsCapitalize (Ctrl+Alt+U)

Capitalize the selected text or the current word.

ToolsJoin Lines (Ctrl+J)

Joins the selected lines, or the current line and the line below with one white space character as a separator. Leading/trailing white space on joined lines is removed in the affected ends.

ToolsApply Word Wrap

Apply static word wrapping on all the document. That means that a new line of text will automatically start when the current line exceeds the length specified by the Wrap words at option in the Editing tab in SettingsConfigure Editor...

If the plugin Insert File is enabled, you will find here an additional menu item Insert File....

The Settings Menu

SettingsConfigure Editor...

This menu item opens a dialog whereby several different settings may be adjusted.

The KrViewer Menu

KrViewerGeneric viewer (Ctrl+Shift+G)

Krusader's internal viewer is actually part of Konqueror, which can basically view every file type viewable by Konqueror (e.g. display pictures, play music, show the content of an archive).

KrViewerText viewer (Ctrl+Shift+T)

View the file in text mode.

KrViewerHex viewer (Ctrl+Shift+H)

View the file in hex mode.

KrViewerLister (Ctrl+Shift+L)

Fast text/hex viewer for huge filesizes, done by Krusader lister.

KrViewerText editor (Ctrl+Shift+E)

Edit the file in text mode.

KrViewerDetach Tab (Ctrl+Shift+D)

Detach browsing Tab and open in a new window.

KrViewerQuit (Ctrl+Q)

Closes Krusader's viewer/editor window.

The Editor Component Configuration

This group contains all pages related to the editor component of Krusader. Most of the settings here are defaults, they can be overridden by defining a filetype, by Document Variables or by changing them per document during an editing session.

Appearance

General
Dynamic Word Wrap

If this option is checked, the text lines will be wrapped at the view border on the screen.

Dynamic word wrap indicators (if applicable)

Choose when the Dynamic word wrap indicators should be displayed, either Off, Follow Line Numbers or Always on.

Align dynamically wrapped lines to indentation depth:

Enables the start of dynamically wrapped lines to be aligned vertically to the indentation level of the first line. This can help to make code and markup more readable.

Additionally, this allows you to set a maximum width of the screen, as a percentage, after which dynamically wrapped lines will no longer be vertically aligned. For example, at 50%, lines whose indentation levels are deeper than 50% of the width of the screen will not have vertical alignment applied to subsequent wrapped lines.

Whitespace Highlighting
Highlight tabulators

The editor will display a » symbol to indicate the presence of a tab in the text.

Highlight trailing spaces

The editor will display dots to indicate the presence of extra whitespace at the end of lines.

Advanced

Show indentation lines

If this is checked, the editor will display vertical lines to help identifying indent lines.

Highlight range between selected brackets

If this is enabled, the range between the selected matching brackets will be highlighted.

Borders
Borders
Show folding markers (if available)

If this option is checked, the current view will display marks for code folding, if code folding is available.

Show icon border

If this is checked, you will see an icon border on the left hand side. The icon border shows bookmark signs for instance.

Show line numbers

If this is checked, you will see line numbers on the left hand side.

Show scrollbar marks

If this option is checked the current view will show marks on the vertical scrollbar. These marks will for instance show bookmarks.

Sort Bookmarks Menu
By creation

Each new bookmark will be added to the bottom, independently from where it is placed in the document.

By position

The bookmarks will be ordered by the line numbers they are placed at.

Fonts & Colors

This section of the dialog lets you configure all fonts and colors in any color scheme you have, as well creating new schemes or deleting existing ones. Each scheme has settings for colors, fonts and normal and highlight text styles.

Krusader will preselect the currently active scheme for you, if you want to work on a different scheme start by selecting that from the Schema combobox. With the New and Delete button you can create a new scheme or delete existing ones.

At the bottom of the page you can select the Default schema for Krusader.

Colors
Text Area Background
Normal text

This is the default background for the editor area, it will be the dominant color on the editor area.

Selected text

This is the background for selected text. The default is the global selection color, as set in your Plasma™ color preferences.

Current line

Set the color for the current line. Setting this a bit different from the Normal text background helps to keep focus on the current line.

Bookmark

This combobox lets you set overlay colors for various mark types. The color is mixed into the background color of a marked line, so that a line with more marks or a marked line that is current has a background that is a mix of more colors. The mark colors are also used if you enable display of scrollbar marks.

Additional Elements
Left border background

This color is used for the marks, line numbers and folding marker borders in the left side of the editor view when they are displayed.

Line numbers

This color is used to draw the line numbers on the left side of the view when displayed.

Bracket highlight

This color is used to draw the background of matching brackets.

Word wrap markers

This color is used to draw a pattern to the left of dynamically wrapped lines when those are aligned vertically, as well as for the static word wrap marker.

Tab and space markers

This color is used to draw white space indicators when enabled.

Spelling mistake line

sets the color of the line that is used to indicate spelling mistakes.

Fonts

Here you can choose the font for the schema. You can choose from any font available on your system, and set a default size. A sample text displays at the bottom of the dialog, so you can see the effect of your choices.

Normal Text Styles

The normal text styles are inherited by the highlight text styles, allowing the editor to present text in a very consistent way, for example comment text is using the same style in almost all of the text formats that Krusader can highlight.

The name in the list of styles is using the style configured for the item, providing you with an immediate preview when configuring a style.

Each style lets you select common attributes as well as foreground and background colors. To unset a background color, rightclick to use the context menu.

Highlighting Text Styles

Here you can edit the text styles used by a specific highlight definition. The editor preselects the highlight used by your current document. To work on a different highlight, select one in the Highlight combobox above the style list.

The name in the list of styles is using the style configured for the item, providing you with an immediate preview when configuring a style.

Each style lets you select common attributes as well as foreground and background colors. To unset a background color, rightclick to use the context menu. In addition you can see if a style is equal to the default style used for the item, and set it to that if not.

You will notice that many highlights contain other highlights represented by groups in the style list. For example most highlights import the Alert highlight, and many source code formats imports the Doxygen highlight. Editing colors in those groups only affects the styles when used in the edited highlight format.

Editing

General
Static Word Wrap

Word wrap is a feature that causes the editor to automatically start a new line of text and move (wrap) the cursor to the beginning of that new line. Krusader will automatically start a new line of text when the current line reaches the length specified by the Wrap Words At: option.

Enable static word wrap

Turns static word wrap on or off.

Show static word wrap markers (if applicable)

If this option is checked, a vertical line will be drawn at the word wrap column as defined in the SettingsConfigure Editor... in the Editing tab. Please note that the word wrap marker is only drawn if you use a fixed pitch font.

Wrap words at:

If the Enable static word wrap option is selected this entry determines the length (in characters) at which the editor will automatically start a new line.

Misc
Remove trailing spaces while editing

Krusader will automatically eliminate extra spaces at the ends of lines of text.

Auto brackets

When the user types a left bracket ([, (, or {) Krusader automatically enters the right bracket (}, ), or ]) to the right of the cursor.

Copy/Cut the current line if no selection

If this option is enabled and the text selection is empty, copy and cut action are performed for the line of text at the actual cursor position.

Allow scrolling past the end of the document

This option lets you scroll past the end of the document. This can be used to vertically centre the bottom of the document, or put it on top of the current view.

Cursor & Selection
Text Cursor Movement
Smart home and smart end

When selected, pressing the home key will cause the cursor to skip white space and go to the start of a line's text.

Wrap cursor

When on, moving the insertion cursor using the Left and Right keys will go on to previous/next line at beginning/end of the line, similar to most editors.

When off, the insertion cursor cannot be moved left of the line start, but it can be moved off the line end, which can be very handy for programmers. When this option is chosen, moving the cursor with the arrow keys off the end of a line (to the right) causes it to jump down to the beginning of the next line. Likewise when the cursor is moved past the beginning of a line (to the left) it jumps up to the end of the preceding line. When this option is not selected, moving the cursor right past the end of a line merely causes it to continue horizontally in the same line and trying to move it left past the beginning does nothing.

PageUp/PageDown moves cursor

This option changes the behavior of the cursor when the user presses the Page Up or Page Down key. If unselected the text cursor will maintain its relative position within the visible text in Krusader as new text becomes visible as a result of the operation. So if the cursor is in the middle of the visible text when the operation occurs it will remain there (except when one reaches the beginning or end.) With this option selected, the first key press will cause the cursor to move to either the top or bottom of the visible text as a new page of text is displayed.

Autocenter cursor (lines):

Sets the number of lines to maintain visible above and below the cursor when possible.

Text Selection Mode
Normal

Selections will be overwritten by typed text and will be lost on cursor movement.

Persistent

Selections will stay even after cursor movement and typing.

Indentation
Default Indentation mode:

Select the automatic indentation mode you want to use as default. It is strongly recommended to use None or Normal here, and use filetype configurations to set other indentation modes for text formats like C/C++ code or XML.

Indent using
Tabulators

When this is enabled the editor will insert tabulator characters when you press the Tab key or use automatic indentation.

Spaces

When this is enabled the editor will insert a calculated number of spaces according to the position in the text and the tab-width setting when you press the Tab key or use automatic indentation.

Tabulators and Spaces

When this is enabled, the editor will insert spaces as describe above when indenting or pressing Tab at the beginning of a line, but insert tabulators when the Tab key is pressed in the middle or end of a line.

Tab width:

This configures the number of spaces that are displayed in place of a tabulator character.

Indentation width:

The indentation width is the number of spaces which is used to indent a line. If configured to indent using tabulators, a tabulator character is inserted if the indentation is divisible by the tab width.

Indentation Properties
Keep Extra Spaces

If this option is disabled, changing the indentation level aligns a line to a multiple of the width specified in Indentation width.

Adjust indentation of code pasted from the clipboard

If this option is selected, pasted code from the clipboard is indented. Triggering the Undo action removes the indentation.

Indentation Actions
Backspace key in leading blank space unindents

If this option is selected, the Backspace key decreases the indentation level if the cursor is located in the leading blank space of a line.

Tab key action (if no selection exists)

If you want Tab to align the current line in the current code block like in emacs, make Tab a shortcut to the action Align.

Always advance to the next tab position

If this option is selected, the Tab key always inserts white space so that the next tab position is reached. If the option Insert spaces instead of tabulators on the General tab in the Editing page is enabled, spaces are inserted; otherwise, a single tabulator is inserted.

Always increase indentation level

If this option is selected, the Tab key always indents the current line by the number of character positions specified in Indentation width.

Increase indentation level if in leading blank space

If this option is selected, the Tab key either indents the current line or advances to the next tab position. If the insertion point is at or before the first non-space character in the line, or if there is a selection, the current line is indented by the number of character positions specified in Indentation width. If the insertion point is located after the first non-space character in the line and there is no selection, white space is inserted so that the next tab position is reached: if the option Insert spaces instead of tabulators on the General tab in the Editing page is enabled, spaces are inserted; otherwise, a single tabulator is inserted.

Auto Completion
General
Enable auto completion

If enabled, a word completion box automatically pops up during typing showing a list of text entries to complete the current text under the cursor.

Minimal word length to complete

While typing text, the word completion searches for words in the document starting with the already typed text. This option configures the minimal amount of characters that are needed to make the word completion active and pop up a completion box.

Vi Input Mode
General
Use VI input mode

When selected, the vi input mode will be enabled when opening a new view. You can still toggle the vi input mode on/off for a particular view in the Edit menu.

Let Vi commands override Kate shortcuts

When selected, Vi commands will override Krusader's built-in commands. For example: Ctrl+R will redo, and override the standard action (showing the search and replace dialog).

Hide the Vi mode status bar

By default, an extra status bar will be used when the Vi input mode is enabled. This status bar shows commands while they are being typed and messages/errors produced by Vi commands.

Checking this option will hide this extra status line.

Key Mapping

Key mapping is used to change the meaning of typed keys. This allows you to move commands to other keys or make special keypresses for doing a series of commands.

Example:

F2 -> I-- Esc

This will prepend I-- to a line when pressing F2.

Spellcheck

These configuration options are described in the documentation for the System Settings module Spell Checker.

Open/Save

General
File Format
Encoding:

This defines the standard encoding to use to open/save files, if not changed in the open/save dialog or by using a command line option.

Encoding Detection

Select an item from the drop down box, either to disable autodetection or use Universal to enable autodetection for all encodings. But as this may probably only detect utf-8/utf-16, selecting a region will use custom heuristics for better results. If neither the encoding chosen as standard above, nor the encoding specified in the open/save dialog, nor the encoding specified on command line match the content of the file, this detection will be run.

Fallback Encoding

This defines the fallback encoding to try for opening files if neither the encoding chosen as standard above, nor the encoding specified in the open/ save dialog, nor the encoding specified on command line match the content of the file. Before this is used, an attempt will be made to determine the encoding to use by looking for a byte order marker at start of file: if one is found, the right unicode encoding will be chosen; otherwise encoding detection will run, if both fail fallback encoding will be tried.

End of line:

Choose your preferred end of line mode for your active document. You have the choice between UNIX®, DOS/Windows® or Macintosh.

Automatic end of line detection

Check this if you want the editor to autodetect the end of line type. The first found end of line type will be used for the whole file.

Enable byte order marker

The byte order mark is a special sequence at the beginning of unicode encoded documents. It helps editors to open text documents with the correct unicode encoding. For more information see Byte Order Mark.

Automatic Cleanups on Load/Save
Remove trailing spaces

The editor will automatically eliminate extra spaces at the ends of lines of text while loading/saving the file.

Advanced
Folder Config File
Search depth for config file:

The editor will search the given number of folder levels upwards for Krusader config file and load the settings line from it. Further information about these hidden folder config files you find in the document variables section.

Backup on Save

Backing up on save will cause Krusader to copy the disk file to <prefix><filename><suffix> before saving changes. The suffix defaults to ~ and prefix is empty by default.

Local files

Check this if you want backups of local files when saving.

Remote files

Check this if you want backups of remote files when saving.

Prefix

Enter the prefix to prepend to the backup file names.

Suffix

Enter the suffix to add to the backup file names.

Disable swap file syncing

Krusader is able to recover (most of) what was written after last save in case of a crash or power failure. A swap file (.swp.<filename>) is created after the first editing action on a document. If the user doesn’t save the changes and Krusader crashes, the swap file remains on the disk. When opening a file, Krusader checks if there is a swap file for the document and if it is, it asks the user whether he wants to recover the lost data or not. The user has the possibility to view the differences between the original file and the recovered one, too. The swap file is deleted after every save and on normal exit.

Krusader syncs the swap files on the disk every 15 seconds, but only if they have changed since the last sync. The user can disable the swap files syncing if he wants, by checking the Disable swap file syncing box, but this can lead to more data loss.

Modes & Filetypes

This page allows you to override the default configuration for documents of specified MIME types. When the editor loads a document, it will try if it matches the file masks or MIME types for one of the defined filetypes, and if so apply the variables defined. If more filetypes match, the one with the highest priority will be used.

Filetype:

The filetype with the highest priority is the one displayed in the first drop down box. If more filetypes were found, they are also listed.

New

This is used to create a new filetype. After you click on this button, the fields below get empty and you can fill the properties you want for the new filetype.

Delete

To remove an existing filetype, select it from the drop down box and press the Delete button.

Properties of current filetype

The filetype with the highest priority is the one displayed in the first drop down box. If more filetypes were found, they are also listed.

Name:

The name of the filetype will be the text of the corresponding menu item. This name is displayed in the ToolsFiletypes

Section:

The section name is used to organize the file types in menus. This is also used in the ToolsFiletypes menu.

Variables:

This string allows you to configure Krusader's settings for the files selected by this MIME type using Krusader variables. You can set almost any configuration option, such as highlight, indent-mode, etc.

Press Edit to see a list of all available variables and their descriptions. Select the checkbox on the left to enable a particular variable and then set the value of the variable on the right. Some variables provide a drop-down box to select possible values from while others require you to enter a valid value manually.

For complete information on these variables, see Configuring with Document Variables.

Highlighting:

If you create a new file type, this drop down box allows you to select a filetype for highlighting.

Indentation Mode:

The drop down box specifies the indentation mode for new documents.

File extensions:

The wildcards mask allows you to select files by filename. A typical mask uses an asterisk and the file extension, for example *.txt; *.text. The string is a semicolon-separated list of masks.

MIME types:

Displays a wizard that helps you easily select MIME types.

Priority:

Sets a priority for this file type. If more than one file type selects the same file, the one with the highest priority will be used.

Download Highlighting Files...

Click this button to download new or updated syntax highlight descriptions from the Krusader website.

Extensions

The Plugins tab lists all available plugins and you can check those you want to use. Click on the Information button to open the About dialog of this plugin.

Once a configurable plugin is checked, the Configure button is enabled and you can click it in order to configure the highlighted plugin.

Editor Component Plugins

AutoBrace

The autobrace plugin supersedes the Krusader internal Auto Brackets feature. It automatically inserts a closing brace } at the beginning of the next line after ending a line with an opening one { and pressing the Enter key.

Data Tools

Enables data tools like thesaurus and spell check (if installed). Data tools are only available when text is selected, or when the right mouse button is clicked over a word. If no data tools are offered even when text is selected, you need to install them. If this plugin is enabled and data tools are installed, additional items appear at the end of the context menu.

Exporter

This command allows you to export the current document with all highlighting information into a HTML document using FileExport as HTML. Additionally you can use EditCopy as HTML to copy the currently selected text as HTML to the system clipboard.

IconInserter

The icon inserter plugin is only of use for KDE developers: It adds an item Insert KIcon-Code into the context menu of the editor. If activated, the Plasma™'s icon chooser opens (showing application icons, action icons etc...). If you click on it, the file name without file extension will be inserted as text. Useful only for setting icons via KF5 through the KIcon() class.

Insane (not ZEN) HTML coding (light edition)

A plugin, which does zen-coding like selector completion. For more information see Zen Coding.

Insert File

This plugin allows you to insert any readable file at the cursor position. If enabled, the Tools menu has an additional menu item Insert File.