<chapter id="on-screen-fundamentals"> <title>Some Fundamentals</title> <para> &kwrite; is very simple to use. Anyone that has used a text editor should have no problems. </para> <sect1 id="drag-and-drop"> <title>Drag and Drop</title> <para> &kwrite; uses the &kde; Drag and Drop protocol. Files may be dragged and dropped onto &kwrite; from the Desktop, the filemanager &dolphin;, or some remote &FTP; site opened in one of &dolphin;'s windows. </para> </sect1> <sect1 id="command-line-options"> <title>Command Line Options</title> <para> Though &kwrite; may most often be started from the &kde; program menu, or a desktop icon, it can also be opened at the command line prompt of a terminal window. There are a few useful options that are available when doing this. </para> <sect2 id="specify-a-file"> <title>Specify a File</title> <para>By specifying the path and name of a particular file the user can have &kwrite; open (or create) that file immediately upon startup. This option might look something like the following:</para> <informalexample><screen> <prompt>%</prompt> <userinput><command>kwrite</command> <option><replaceable>/home/myhome/docs/myfile.txt</replaceable></option> </userinput> </screen> </informalexample> </sect2> <sect2 id="editing-files-on-the-internet"> <title>Specify a file on the Internet</title> <para>The above-mentioned method could even be used to open files on the Internet (if the user has an active connection at the time.) An example of this might look like the following:</para> <informalexample><screen> <prompt>%</prompt> <userinput><command>kwrite</command> <option><replaceable>ftp://ftp.kde.org/pub/kde/README</replaceable> </option></userinput> </screen> </informalexample> </sect2> <sect2 id="other-command-line-options"> <title>Other Command Line Options</title> <para>The following command line help options are available</para> <variablelist> <varlistentry> <term><userinput><command>kwrite</command> <option>--help</option></userinput></term> <listitem><para>This lists the most basic options available at the command line.</para></listitem> </varlistentry> <varlistentry> <term><userinput><command>kwrite</command> <option>--help-qt</option></userinput></term> <listitem><para>This lists the options available for changing the way &kwrite; interacts with &Qt;.</para></listitem> </varlistentry> <varlistentry> <term><userinput><command>kwrite</command> <option>--help-kde</option></userinput></term> <listitem><para>This lists the options available for changing the way &kwrite; interacts with &kde;.</para></listitem> </varlistentry> <varlistentry> <term><userinput><command>kwrite</command> <option>--help-all</option></userinput></term> <listitem><para>This lists all of the command line options.</para></listitem> </varlistentry> <varlistentry> <term><userinput><command>kwrite</command> <option>--author</option></userinput></term> <listitem><para>Lists &kwrite;'s authors in the terminal window</para></listitem> </varlistentry> <varlistentry> <term><userinput><command>kwrite</command> <option>-v, --version</option></userinput></term> <listitem><para>Lists version information for &Qt;, &kde;, and &kwrite;. Also available through <userinput><command>kwrite</command> <option>-v</option></userinput> </para></listitem> </varlistentry> <varlistentry> <term><userinput><command>&kwrite;</command> <option>--license</option></userinput></term> <listitem> <para>Shows license information.</para> </listitem> </varlistentry> <varlistentry> <term><userinput><command>kwrite</command> <option>--stdin</option></userinput></term> <listitem><para>Causes &kwrite; to read the document content from STDIN. This is similar to the common option <option>-</option> used in many command line programs, and allows you to pipe command output into &kwrite;.</para></listitem> </varlistentry> <varlistentry> <term><userinput><command>kwrite</command> <option>--encoding</option> <parameter>encoding</parameter> <parameter>&URL;</parameter></userinput></term> <listitem><para>Causes &kwrite; to use the specified encoding for the document. </para></listitem> </varlistentry> <varlistentry> <term><userinput><command>kwrite</command> <option>--line</option> <parameter>line</parameter> <parameter>&URL;</parameter></userinput></term> <listitem><para>Navigate to the specified line after opening the document. </para></listitem> </varlistentry> <varlistentry> <term><userinput><command>kwrite</command> <option>--column</option> <parameter>column</parameter> <parameter>&URL;</parameter></userinput></term> <listitem><para>Navigate to the specified column after opening the document. </para></listitem> </varlistentry> </variablelist> </sect2> </sect1> <sect1 id="keybindings"> <!--60 shortcuts here and 4.4.63 has 89 lueck missing ctrl+6,7,8,9,T,Home,End ctrl+shift+O,Home,End,PgUp,Left,Right,PgDown Shift+Home --> <title>Shortcuts</title> <para>Many of the shortcuts are configurable by way of the <link linkend="settings">Settings</link> menu. By default &kwrite; honors the following shortcuts:</para> <informaltable> <tgroup cols="2"> <tbody> <row><entry><para><keycombo action="simul"><keycap>Ins</keycap></keycombo></para></entry> <entry><para> Toggle between Insert and Overwrite mode. When in insert mode the editor will add any typed characters to the text while pushing along any data to the right of the text cursor. Overwrite mode causes the entry of each character to eliminate the character immediately to the right of the text cursor.</para></entry> </row> <row> <entry><para><keycombo action="simul"><keycap>Left Arrow</keycap></keycombo></para></entry> <entry><para>Move the cursor one character to the left </para></entry> </row> <row> <entry><para><keycombo action="simul"><keycap>Right Arrow</keycap></keycombo></para></entry> <entry><para> Move the cursor one character to the right </para></entry> </row> <row> <entry><para><keycombo action="simul"><keycap>Up Arrow</keycap></keycombo></para></entry> <entry><para> Move the cursor up one line </para></entry> </row> <row> <entry><para><keycombo action="simul"><keycap>Down Arrow</keycap></keycombo></para></entry> <entry><para> Move the cursor down one line </para></entry> </row> <row> <entry><para><keycombo action="simul"><keycap>Page Up</keycap></keycombo></para></entry> <entry><para> Move the cursor up one page </para></entry> </row> <row> <entry><para><keycombo action="simul">&Alt;<keycap>Page Up</keycap></keycombo></para></entry> <entry><para>Previous Bookmark</para></entry> </row> <row> <entry><para><keycombo action="simul"><keycap>Page Down</keycap></keycombo></para></entry> <entry><para>Move the cursor down one page </para></entry> </row> <row> <entry><para><keycombo action="simul">&Alt;<keycap>Page Down</keycap></keycombo></para></entry> <entry><para>Next Bookmark</para></entry> </row> <row> <entry><para><keycombo action="simul">&Backspace;</keycombo></para></entry> <entry><para> Delete the character to the left of the cursor </para></entry> </row> <row> <entry><para><keycombo action="simul"><keycap>Home</keycap></keycombo></para></entry> <entry><para> Move the cursor to the beginning of the line </para></entry> </row> <row> <entry><para><keycombo action="simul"><keycap>End</keycap></keycombo></para></entry> <entry><para> Move the cursor to the end of the line </para></entry> </row> <row> <entry><para><keycombo action="simul"><keycap>Delete</keycap></keycombo></para></entry> <entry><para>Delete the character to the right of the cursor (or any selected text)</para></entry> </row> <row> <entry><para><keycombo action="simul">&Shift;&Enter;</keycombo></para></entry> <entry><para>Insert newline including leading characters of the current line which are not letters or numbers. It is useful ⪚ to write comments in the code: At the end of the line <quote>// some text</quote> press this shortcut and the next line starts already with <quote>// </quote>. So you do not have to enter the comment characters at the beginning of each new line with comments.</para></entry> </row> <row> <entry><para><keycombo action="simul">&Shift;<keycap>Left Arrow</keycap></keycombo></para></entry> <entry><para> Mark text one character to the left </para></entry> </row> <row> <entry><para><keycombo action="simul">&Shift;<keycap>Right Arrow</keycap></keycombo></para></entry> <entry><para> Mark text one character to the right </para></entry> </row> <row> <entry><para><keycombo action="simul"><keycap>F1</keycap></keycombo></para></entry> <entry><para> Help</para></entry> </row> <row> <entry><para><keycombo action="simul">&Shift;<keycap>F1</keycap></keycombo></para></entry> <entry><para>What's this?</para></entry> </row> <row> <entry><para><keycombo action="simul"><keycap>F3</keycap></keycombo></para></entry> <entry><para><link linkend="find-again"> Find Next</link></para></entry> </row> <row> <entry><para><keycombo action="simul">&Shift;<keycap>F3</keycap></keycombo></para></entry> <entry><para><link linkend="find-previous"> Find Previous</link></para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>H</keycap></keycombo></para></entry> <entry><para><link linkend="find-selected">Find Selected</link></para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;&Shift;<keycap>H</keycap></keycombo></para></entry> <entry><para><link linkend="find-selected-backwards">Find Selected Backwards</link></para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>A</keycap></keycombo></para></entry> <entry><para>Select All</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;&Shift;<keycap>A</keycap></keycombo></para></entry> <entry><para>Deselect</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;&Shift;<keycap>B</keycap></keycombo></para></entry> <entry><para>Block Selection Mode</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>B</keycap></keycombo></para></entry> <entry><para>Set a Bookmark</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>C</keycap></keycombo></para></entry> <entry><para> Copy the marked text to the clipboard. </para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>D</keycap></keycombo></para></entry> <entry><para> Comment</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;&Shift;<keycap>D</keycap></keycombo></para></entry> <entry><para> Uncomment</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>F</keycap></keycombo></para></entry> <entry><para><link linkend="find"> Find</link></para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>G</keycap></keycombo></para></entry> <entry><para> Go to line...</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>I</keycap></keycombo></para></entry> <entry><para> Indent selection</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;&Shift;<keycap>I</keycap></keycombo></para></entry> <entry><para> Unindent selection</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>J</keycap></keycombo></para></entry> <entry><para>Join Lines</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo></para></entry> <entry><para> <link linkend="new">New</link> document</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>O</keycap></keycombo></para></entry> <entry><para><link linkend="open">Open a document</link> </para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>P</keycap></keycombo></para></entry> <entry><para><link linkend="print">Print</link> </para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>Q</keycap></keycombo></para></entry> <entry><para>Quit - close active copy of editor </para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>R</keycap></keycombo></para></entry> <entry><para><link linkend="replace"> Replace</link></para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>S</keycap></keycombo></para></entry> <entry><para>Invokes the <link linkend="save"><guilabel>Save</guilabel></link> command.</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>U</keycap></keycombo></para></entry> <entry><para>Uppercase</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;&Shift;<keycap>U</keycap></keycombo></para></entry> <entry><para>Lowercase</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;&Alt;<keycap>U</keycap></keycombo></para></entry> <entry><para>Capitalize</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>V</keycap></keycombo></para></entry> <entry><para> Paste the clipboard text into line edit. </para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>W</keycap></keycombo></para></entry> <entry><para><link linkend="close">Close</link> </para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>X</keycap></keycombo></para></entry> <entry><para>Delete the marked text and copy it to the clipboard. </para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>Z</keycap></keycombo></para></entry> <entry><para><link linkend="undo">Undo</link></para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;&Shift;<keycap>Z</keycap></keycombo></para></entry> <entry><para><link linkend="redo">Redo</link></para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>-</keycap></keycombo></para></entry> <entry><para>Collapse One Local Level</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;&Shift;<keycap>-</keycap></keycombo></para></entry> <entry><para>Collapse Toplevel</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>+</keycap></keycombo></para></entry> <entry><para>Expand One Local Level</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;&Shift;<keycap>+</keycap></keycombo></para></entry> <entry><para>Expand Toplevel</para></entry> </row> <row> <entry><para><keycombo action="simul"><keysym>Meta</keysym>&Ctrl;<keycap>V</keycap></keycombo></para></entry> <entry><para>VI input mode</para></entry> </row> <row> <entry><para><keycombo action="simul">&Ctrl;<keycap>Space</keycap></keycombo></para></entry> <entry><para>Invoke Code Completion</para></entry> </row> <row> <entry><para><keycombo action="simul"><keycap>F5</keycap></keycombo></para></entry> <entry><para><link linkend="reload"> Reload</link></para></entry> </row> <row> <entry><para><keycombo action="simul"><keycap>F6</keycap></keycombo></para></entry> <entry><para>Show/Hide Icon Border</para></entry> </row> <row> <entry><para><keycombo action="simul"><keycap>F7</keycap></keycombo></para></entry> <entry><para> Switch to Command Line</para></entry> </row> <row> <entry><para><keycombo action="simul"><keycap>F9</keycap></keycombo></para></entry> <entry><para> Show/Hide Folding Markers</para></entry> </row> <row> <entry><para><keycombo action="simul"><keycap>F10</keycap></keycombo></para></entry> <entry><para> Dynamic Word Wrap</para></entry> </row> <row> <entry><para><keycombo action="simul"><keycap>F11</keycap></keycombo></para></entry> <entry><para> Show/Hide Line Numbers</para></entry> </row> </tbody> </tgroup> </informaltable> </sect1> </chapter>