# 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 &konfiggereral-lnk;

## 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; (&eg; 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 (&eg; a binary) doesn't 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 &konfiggereral-lnk; .

&Shift; F3views a &URL; on demand, &eg;:

- ``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 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; E the viewer can start &krusader;'s internal editor (which is basically the same application).

The embedded viewer is not written by us, it is supplied via &kde; (libs) and &kioslaves1-url; We cannot and do not want to change it, usings 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 &konfiggereral-lnk;, if you prefer to use an external editor.

When you use &krusader;'s internal editor for the first time, it is recommended to look at each section of the Settingsmenu, and configure it the way you want it.

## Menu overview

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

### Filemenu

&Ctrl; S File Save

  Save file.

File Save As

  Save file with another name.

F5 File Reload

  Reload file.

File Export

  Export the file to `HTML` format.

&Ctrl; P File Print

  Print the file.

### Edit menu

&Ctrl; Z Edit Undo

  Undo last action.

&Ctrl;&Shift; Z Edit Redo

  Redo last action.

&Ctrl; X Edit Cut

  Cut selected text to clipboard.

&Ctrl; C Edit Copy

  Copy selected text to clipboard.

&Ctrl; V Edit Paste

  Paste clipboard content to the document.

&Ctrl; A Edit Select All

  Select whole document.

&Ctrl;&Shift; A Edit Deselect

  Deselect current selection.

&Ctrl;&Shift; B Edit Block Selection Mode

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

Insert Edit Overwrite Mode

  Toggle Insert/Overwrite Mode.

&Ctrl; F Edit Find

  Find text.

F3 Edit Find Next

  Find next text.

&Shift; F3 Edit Find Previous

  Find previous text.

&Ctrl; R Edit Replace

  Replace text.

&Ctrl; G Edit Go to line

  Go to given line number.

### Viewmenu

F7 View Switch to Command Line.

  Display Command Line.

View Schema.

  Set Schema &eg; &krusader; Normal, &krusader; Printing, &kate; Normal, &kwrite; Normal.

F10 View Dynamic Word Wrap

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

View Dynamic Word Wrap Indicators

  Off, Follow Line Numbers, Always On.

View Shows Static Word Wrap marker

F6 View Show Icon Border

  Shows Icon Border.

F11 View Show Line Numbers

  Shows the line numbers.

View Show Scrollbar Marks.

F9 View Hide Folding Markers

View Code Folding.

View Set Encoding

  &eg; ISO8859-1, utf8, utf16, tscii, ... .

### Bookmarksmenu

&Ctrl; B Bookmark Set Bookmark

Bookmark Clear All Bookmarks

### Toolsmenu

Tools Read Only Mode

Tools Filetype Mode

Tools Highlight mode

  Highlight mode for scripts, programming languages, markup file, &etc;: &eg; `HTML, Bash, C++, XML, Makefile, Diff, ...`.

Tools End of Line

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

&Ctrl; I Tools Indent

&Ctrl;&Shift; I Tools Unindent

Tools Clean Indentation

&Ctrl; D Tools Comment

  Add appropriate comment tags, if available.

&Ctrl;&Shift; D Tools Uncomment

  Removes the comment tags on the left.

&Ctrl; U Tools Uppercase

&Ctrl;&Shift; U Tools Lowercase

&Alt;&Ctrl; U Tools Capitalize

&Ctrl; J Tools Join Lines

Tools Word Wrap Document

### Settings -> Configure Editormenu

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 Indentation

  Indentation configuration: Automatically indent, use Spaces to indent, &Tab; Keys indent, &Backspace; key unindents, 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: &eg; kTexteditor incremental search plugin, kTexteditor insert file plugin, kTexteditor kdatatoolplugin...

### KrViewermenu

&Ctrl;&Shift; G KrViewer Generic viewer

  &krusader;'s internal viewer is actually part of Konqueror, which can basically view every file type viewable by &konqueror; (&eg; display pictures, play music, show the content of an archive).

&Ctrl; T KrViewer Text viewer

  View the file in text mode.

&Ctrl;&Shift; H KrViewer Hex viewer

  View the file in hex mode.

&Ctrl;&Shift; E KrViewer Text editor

  Edit the file in text mode.

&Alt; Right KrViewer Next Tab

  Next browsing Tab.

&Alt; Left KrViewer Previous Tab

  Previous browsing Tab.

&Ctrl;&Shift; D KrViewer Detach Tab

  Detach browsing Tab and open in a new window.

&Esc; KrViewer Close current Tab.

  Close current browsing Tab.

&Ctrl; Q KrViewer Close

  Closes &krusader;'s viewer/editor window.