# The Menu Entries

## The File Menu

&Ctrl;N File New

- This starts a new document in a new and independent editor window.

File New 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.

&Ctrl;O File Open...

- Displays a standard &kde; Open File dialog. Use the file view to select the file you want to open, and click on Open to open it.

File Open Recent

- This is a shortcut to open recently saved documents. Clicking on this item opens a list to the side of the menu with several of the most recently saved files. Clicking on a specific file will open it in &kappname; - if the file still resides at the same location.

&Ctrl;S File Save

- 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.

&Ctrl;&Shift;S File Save As...

- This allows a document to be saved with a new file name. This is done by means of the file dialog box described above in the Open section of this help file.

File Save As with Encoding

- Save a document with a new file name in a different encoding.

File Save Copy As

- Save a copy of the document with a new file name and continue editing the original document.

F5 File Reload

- 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 &kappname;.

&Ctrl;P File Print...

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

File Export as HTML

- Save the currently open document as an &HTML; file, which will be formatted using the current syntax highlighting and color scheme settings.

&Ctrl;W File Close

- Close the active file with this command. If you have made unsaved changes, you will be prompted to save the file before &kappname; closes it.

&Ctrl;Q File Quit

- This will close the editor window, if you have more than one instance of &kappname; running, through the New or New Window menu items, those instances will not be closed.

## The Edit Menu

&Ctrl;Z Edit Undo

- Undo the last editing command (typing, copying, cutting &etc;)

  This may undo several editing commands of the same type, like typing in characters.

&Ctrl;&Shift;Z Edit Redo

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

&Ctrl;X Edit Cut

- This command deletes the current selection and places it on the clipboard. The clipboard works invisibly and provides a way to transfer data between applications.

&Ctrl;C Edit Copy

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

Edit Copy as HTML

- Copy the selection as &HTML;, formatted using the current syntax highlighting and color scheme settings.

&Ctrl;V Edit Paste

- This will insert the first item in the clipboard at the cursor position. The clipboard works invisibly and provides a way to transfer data between applications.

  If Overwrite Selection is enabled, the pasted text will overwrite the selection, if any.

&Ctrl;&Shift;&Ins; Edit Paste Selection

- This will paste the mouse selection contents that were chosen previously. Mark some text with the mouse pointer to paste it in the currently open file using this menu item.

Edit Swap with clipboard contents

- This will swap the selected text with the clipboard contents.

Edit Clipboard History Paste

- This will open a dialog to select and paste an entry from the clipboard history.

Edit Input Modes

- Switch between a normal and a vi-like, modal editing mode. The vi input 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 tab of the Editing page in &kappname;'s settings dialog.

&Ins; Edit Overwrite Mode

- 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.

Edit Read Only Mode

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

&Ctrl;F Edit Find...

- 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.

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

  Matches in the document are highlighted even when you close the search bar. To clear this highlighting, press the &Esc; key.

  You can choose whether the search should be case sensitive. Selecting 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 at the right side of the incremental search bar to switch to the power search and replace bar.

F3 Edit Find Variants Find Next

- This repeats the last find operation, if any, without calling the incremental search bar, and searching forwards through the document starting from the cursor position.

&Shift;F3 Edit Find Variants Find Previous

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

&Ctrl;H Edit Find Variants Find Selected

- Finds next occurrence of selected text.

&Ctrl;&Shift;H Edit Find Variants Find Selected Backwards

- Finds previous occurrence of selected text.

&Ctrl;R Edit Replace...

- 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 or 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 will limit finds to entries that match the case (upper or lower) of each of the characters in the search pattern. 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 at the right side of the power search and replace bar to switch to the incremental search bar.

## The Selection Menu

&Ctrl;A Selection Select All

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

&Ctrl;&Shift;A Selection Deselect

- Deselects the selected text in the editor if any.

&Ctrl;&Shift;B Selection Block Selection Mode

- Toggles Selection Mode. When the Selection Mode is BLOCK, the status bar contains the string [BLOCK] and you can make vertical selections, ⪚ select column 5 to 10 in lines 9 to 15.

&Ctrl;D Selection Comment

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

&Ctrl;&Shift;D Selection Uncomment

- 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.

&Ctrl;J Selection Join Lines

- 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.

&Ctrl;&Alt;U Selection Capitalization

- Capitalize the selected text or the current word.

&Ctrl;U Selection Uppercase

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

&Ctrl;&Shift;U Selection Lowercase

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

Selection Clean 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.

Selection Format Indent

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

Selection Align On...

- This command aligns lines in the selected block or whole document on the column given by a regular expression that you will be prompted for.

  If you give an empty pattern it will align on the first non-blank character by default.

  If the pattern has a capture it will indent on the captured match.

  Examples:

  With '`-`' it will insert spaces before the first '-' of each lines to align them all on the same column.

  With '`alignon :\\s+(.)`' it will insert spaces before the first non-blank character that occurs after a colon to align them all on the same column.

Selection Apply 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 Settings Configure Editor... menu.

&Ctrl;&Alt;&Up; Selection Add Caret above Cursor

- Adds another caret above the current cursor. The caret is placed in the line directly above and in the same column as the current cursor.

&Ctrl;&Alt;&Down; Selection Add Caret below Cursor

- Adds another caret below the current cursor. The caret is placed in the line directly above and in the same column as the current cursor.

&Alt;&Shift;I Selection Add Cursors to Line Ends

- Adds a cursor to every currently selected line.

&Alt;J Selection Find and Select Next Occurrence

- Finds the next occurrence of the word currently under the cursor, selects it and adds a cursor.

&Ctrl;&Alt;&Shift;J Selection Find and Select All Occurrences

- Finds all occurrences of the word currently under the cursor, selects them and adds a cursor for each of them.

## The View Menu

&Ctrl;+ View Enlarge Font

- This increases the display font size.

&Ctrl;- View Shrink Font

- This decreases the display font size.

F10 View Word Wrap Dynamic Word Wrap

- Toggles dynamic word wrap in the current view. Dynamic word wrap makes all the text in a view visible without the need for horizontal scrolling by rendering one actual line on more visual lines as needed.

View Word Wrap Dynamic 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.

View Word Wrap Show Static Word Wrap Marker

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

F6 View Borders Show Icon Border

- 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.

F11 View Borders Show Line Numbers

- 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.

View Borders Show 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.

View Borders Show Scrollbar Mini-Map

- This will replace the scrollbar with a visualization of the current document. For more information on the scrollbar minimap, see kate-part-scrollbar-minimap.

View Code Folding

- These options pertain to code folding:

  View Borders Code Folding Show Folding Markers

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

View Code Folding Fold Current Node

- Collapse the region that contains the cursor.

View Code Folding Unfold Current Node

- Expand the region that contains the cursor.

&Ctrl;&Shift;- View Code Folding Fold Toplevel Nodes

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

&Ctrl;&Shift;+ View Code Folding Unfold Toplevel Nodes

- Expand all toplevel regions in the document.

Show Non-Printable Spaces

- Show/hide bounding box around non-printable spaces.

## The Go Menu

&Ctrl;G Go Go to Line...

- 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.

&Ctrl;E Go Go to Previous Editing Line

- This action jumps the previous editing line in the multicursor configuration.

&Ctrl;&Shift;E Go Go to Next Editing Line

- This action jumps the next editing line in the multicursor configuration.

Go Go to Previous Modified Line

- Lines that were changed since opening the file are called modified lines. This action jumps the previous modified line.

Go Go to Next Modified Line

- Lines that were changed since opening the file are called modified lines. This action jumps the next modified line.

&Ctrl;6 Go Go to Matching Bracket

- Move the cursor to the associated opening or closing bracket.

&Ctrl;&Shift;6 Go Select to Matching Bracket

- Selects the text between associated opening and closing brackets.

&Ctrl;&Shift;6 Go Bookmarks

- Below the entries described here, one entry for each bookmark in the active document will be available. The text will be the first few words of the marked line. Choose an item to move the cursor to the start of that line. The editor will scroll as necessary to make that line visible.

&Ctrl;B Go Bookmarks Set Bookmark

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

Go Bookmarks Clear 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.

&Alt;&PgUp; Go Bookmarks Previous

- 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.

&Alt;&PgDn; Go Bookmarks Next

- 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.

## The Tools Menu

Tools Mode

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

Tools Highlighting

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

Tools Indentation

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

Tools Encoding

- You can overwrite the default encoding set in Settings Configure 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.

Tools Add 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.

Tools End of Line

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

Tools Scripts

- This submenu contains a list of all scripted actions. The list can easily be modified by writing your own scripts. This way, &katepart; can be extended with user-defined tools.

  Tools Scripts Navigation

- &Alt;&Shift;&Up; Tools Scripts Navigation Move cursor to previous matching indent

- Moves the cursor to the first line above the current line that is indented at the same level as the current line.

&Alt;&Shift;&Down; Tools Scripts Navigation Move cursor to next matching indent

- Moves the cursor to the first line below the current line that is indented at the same level as the current line.

Tools Scripts Editing

- Tools Scripts Editing Sort Selected Text

- Sorts the selected text or whole document in ascending order.

&Ctrl;&Shift;&Down; Tools Scripts Editing Move Lines Down

- Move selected lines down.

&Ctrl;&Shift;&Up; Tools Scripts Editing Move Lines Up

- Move selected lines up.

&Ctrl;&Alt;&Down; Tools Scripts Editing Duplicate Selected Lines Down

- Duplicates the selected lines down.

&Ctrl;&Alt;&Up; Tools Scripts Editing Duplicate Selected Lines Up

- Duplicates the selected lines up.

Tools Scripts Editing URI-encode selected text

- Encodes the selected text so that it can be used as part of a query string in a &URL;, replacing the selection with the encoded text.

Tools Scripts Editing URI-decode selected text

- If part of the query string of a &URL; is selected, this will decode it and replace the selection with the original raw text.

Tools Scripts Emmet

- Tools Scripts Emmet Expand abbreviation

- Converts the selected text to a pair of opening and closing &HTML; or &XML; tags. For example, if `div` is selected, this item will replace that with `<div></div>`.

Tools Scripts Emmet Wrap with tag

- Wraps the selected text with the tag provided on the command line.

Tools Scripts Emmet Move cursor to matching tag

- If the cursor is inside an opening &HTML;/&XML; tag, this item will move it to the closing tag. If the cursor is inside the closing tag, it will instead move it to the opening tag.

Tools Scripts Emmet Select &HTML;/&XML; tag contents inwards

- When the cursor is inside a pair of &HTML;/&XML; tags, this option will change the selection to include the contents of those &HTML;/&XML; tags, without selecting the tags themselves.

Tools Scripts Emmet Select &HTML;/&XML; tag contents outwards

- When the cursor is inside a pair of &HTML;/&XML; tags, this item will change the selection to include the contents of those &HTML;/&XML; tags, including the tags themselves.

Tools Scripts Emmet Toggle Comment

- If the selected portion is not a comment, this item will enclose that portion in &HTML;/&XML; comments (⪚ `<!-- selected text -->`). If the selected portion is a comment, the comment tags will be removed instead.

Tools Scripts Emmet Delete tag under cursor

- If the cursor is presently inside a &HTML;/&XML; tag, this item will delete the entire tag.

Tools Scripts Emmet Decrement number by 1

- This item will subtract one from the currently selected text, if it is a number. For example, if `5` is selected, it will become `4`.

Tools Scripts Emmet Decrement number by 10

- This item will subtract 10 from the currently selected text, if it is a number. For example, if `15` is selected, it will become `5`.

Tools Scripts Emmet Decrement number by 0.1

- This item will subtract 0.1 from the currently selected text, if it is a number. For example, if `4.5` is selected, it will become `4.4`.

Tools Scripts Emmet Increment number by 1

- This item will add one to the currently selected text, if it is a number. For example, if `5` is selected, it will become `6`.

Tools Scripts Emmet Increment number by 10

- This item will add 10 to the currently selected text, if it is a number. For example, if `5` is selected, it will become `15`.

Tools Scripts Emmet Increment number by 0.1

- This item will add 0.1 to the currently selected text, if it is a number. For example, if `4.5` is selected, it will become `4.6`.

F7 Tools Switch to Command Line

- 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. For more information on the command line, see The Editor Component Command Line.

&Ctrl;&Space; Tools Invoke Code Completion

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

Tools Word 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.

&Ctrl;&Shift;O Tools Spelling Automatic Spell Checking

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

Tools Spelling Spelling...

- 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.

  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.

Tools Spelling Spelling (from cursor)...

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

Tools Spelling Spellcheck Selection...

- Spellchecks the current selection.

Tools Spelling Change 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 ⪚ for automatic spellcheck of text in different languages.

## The Settings and Help Menu

Settings Editor Color Theme

- This menu lists the available color schemes. You can change the schema for the current view here, to change the default schema you need to use the Fonts & Colors page of the config dialog.

&katepart; has the common &kde; Settings and Help menu items, for more information read the sections about the Settings Menu and Help Menu of the &kde; Fundamentals.