KrViewer: Krusader's internal viewer-editor

Pressing Enter on a selected file opens the file with the associated application.

Viewer

To view a file as fast as possible according to it's type just put it under the cursor and press F3. Krusader's internal viewer is actually a Konqueror part, 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'.

The viewer works as follows:

  • It will try to view the file with the 'Generic viewer'.

  • When the file type cannot be determined or when a file (e.g. a binary) doesn't have a associated action, it disables the 'generic viewer'. The file will be treated as a text file, this is the 'Text viewer'.

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

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

  • man:/ views the manpages.

  • man:/krusader views a manpage.

  • info:/ views the infopages.

  • http://krusader.sourceforce.net/ 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 homedirectory of Frank.

  • /home/frank/archive.tar.gz views a tar.gz archive.

KrViewer can have the following menu's: 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+E the viewer will start Krusader's internal editor (which is basically the same application).

Note

The embedded viewer is not written by us, it is supplied via KDE (libs) and KIOSlave We cannot and don't want to change it, usings these libraries reduces the amount of written code. So we don't have to reinvent the weel ;-)

Editor

Krusader's internal editor has almost everything what 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 used 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

Most of the menus are pretty self-explanatory. ;-)

File menu

File->Save (Ctrl+S)

Save file.

File->Save As

Save file with an other name.

File->Reload (F5)

Reload file.

File->Export

Export the file to html format.

Print->Export (Ctrl+P)

Print the file.

Edit menu

Edit->Undo (Ctrl+Z)

Undo last action.

Edit->Redo (Ctrl+Shift+Z)

Redo last action.

Edit->Cut (Ctrl+X)

Cut selected text to clipboard.

Edit->Copy (Ctrl+C)

Copy selected text to clipboard.

Edit->Paste (Ctrl+V)

Paste clipboard content to the document.

Edit->Select All (Ctrl+A)

Select whole document.

Edit->Deselect (Ctrl+Shift+A)

Deselect current selection.

Edit->Toggle Block Selection (Ctrl+Shift+B)

Toggle Block Selection, this will activate/deactivate the block selection possibility.

Edit->Toggle Insert

Toggle Insert mode.

Edit->Find (Ctrl+F)

Find text.

Edit->Find Next (F3)

Find next text.

Edit->Find Previous (Shift+F3)

Find previous text.

Edit->Replace (Ctrl+R)

Replace text.

Edit->Go to line (Ctrl+G)

Go to given linenumber.

View menu

View->Dynamic Word Wrap (F12)

Go to the next line at the maximum number of characters per line (default 80).

View->Show Folding Markers (F9)

Show Folding Markers.

View->Show Icon Border (F6)

Show Icon Border.

View->Show Line Numbers (F11)

Shows the line numbers.

View->Set Encoding

e.g. ISO8859-1, utf8, utf16, tscii, ... .

Bookmarks menu

Bookmark->Toggle Bookmark (Ctrl+B)

Toggle Bookmark.

Bookmark->Clear Bookmarks

Clear Bookmarks.

Bookmark->Next Bookmark (Alt+PageDown)

Go to the next Bookmark.

Bookmark->Previous Bookmark (Alt+PageUp)

Go to the previous Bookmark.

Tools menu

Tools->Highlight mode

Highlight mode for scripts, programming languages, markup file, etc.: e.g. html, Bash, C++, XML, Makefile, Diff, ... .

Tools->End of Line

Change the end of Line termination: UNIX®, Windows®/DOS, Macintosh®.

Tools->Indent (Ctrl+I)

Indent.

Tools->Unindent (Ctrl+Shift+I)

Unindent.

Tools->Clean Indendation

Clean Indendation.

Tools->Comment (Ctrl+#)

Add appropriate comment tags, if available.

Tools->Uncomment (Ctrl+Shift+#)

Removes the comment tags on the left.

Tools->Apply Word Wrap

Apply Word Wrap.

Tools->Editing command (Ctrl+M)

Opens a dialog box for entering a editing command.

Settings -> Configure Editor menu

Settings->Configure Editor->Colors

Color configuration for the: background, selected text, current line and bracket highlighting.

Settings->Configure Editor->Fonts

Fonts configuration for display and printer: font, font style and size, with a preview window.

Settings->Configure Editor->Identation

Identation configuration: automatically indent, use spaces to indent, Tab keys indent, Backspace keys indent, keep indent profile, keep extra spaces.

Settings->Configure Editor->Selection

Selection configuration: persistent selections, overwrite selected text.

Settings->Configure Editor->Editing

Editing configuration: word wrap config., whitespace config, auto brackets, smart home, wrap cursor, maximum undo steps.

Settings->Configure Editor->Shortcuts

Shortcuts configuration.

Settings->Configure Editor->Highlighting

Highlighting configuration: default styles and highlight mode.

Settings->Configure Editor->View defaults

View defaults: dynamic word wrap, show line numbers, show icon border, show folder markers if available, sort bookmarks menu method.

Settings->Configure Editor->Plugins

Plugins configuration: e.g. kTexteditor incremental search plugin, kTexteditor insert file plugin, kTexteditor kdatatoolplugin...

KrViewer menu

KrViewer->Generic viewer (Ctrl+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).

KrViewer->Text viewer (Ctrl+T)

View the file in text mode.

KrViewer->Hex viewer (Ctrl+H)

View the file in hex mode.

KrViewer->Text editor (Ctrl+E)

Edit the file in text mode.

KrViewer->Close (Esc)

Closes Krusader's viewer/editor window.