PageRenderTime 45ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/www/tags/NOV_07_2009/htdocs/FAQ/usage.html

#
HTML | 390 lines | 386 code | 4 blank | 0 comment | 0 complexity | 38bdcd52f5826e399755970937250847 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Usage Questions</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="jEdit Frequently Asked Questions"><link rel="up" href="index.html" title="jEdit Frequently Asked Questions"><link rel="prev" href="installation.html" title="Installation Questions"><link rel="next" href="macros.html" title="Macros"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Usage Questions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="installation.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="macros.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="usage"></a>Usage Questions</h2></div></div></div><p>This section deals general usage of jEdit, including
  2. customisation.</p><div class="qandaset"><dl><dt>1. <a href="usage.html#text-abbrev">Abbreviations</a></dt><dd><dl><dt>Q: <a href="usage.html#id2549994">How can I create abbreviations &#8220;on the
  3. fly&#8221; as I type?</a></dt><dt>Q: <a href="usage.html#id2550063">How can I have abbreviations expanded automatically as
  4. I type?</a></dt></dl></dd><dt>2. <a href="usage.html#text-clipboard">Clipboard features</a></dt><dd><dl><dt>Q: <a href="usage.html#id2550120">Can I copy selections from more than one location in a
  5. document (or more than one document) and paste the aggregate
  6. text in one operation?</a></dt></dl></dd><dt>3. <a href="usage.html#file-attributes">File Attributes</a></dt><dd><dl><dt>Q: <a href="usage.html#id2550261">Does jEdit preserve file ownership and permissions
  7. when it saves files?</a></dt><dt>Q: <a href="usage.html#id2550321">Why does jEdit ignore my choice for line separator
  8. characters when I save a file?</a></dt><dt>Q: <a href="usage.html#id2550345">Can jEdit auto-detect character encodings when it
  9. opens a file?</a></dt><dt>Q: <a href="usage.html#id2550431">I'm using the iso-8859-1 character encoding. How do I
  10. type and save the Euro sign (&#8220;&#8364;&#8221;)?</a></dt></dl></dd><dt>4. <a href="usage.html#file-manage">File Management</a></dt><dd><dl><dt>Q: <a href="usage.html#id2550524">How can I open files in jEdit using drag and
  11. drop?</a></dt><dt>Q: <a href="usage.html#id2550547">How do I add and remove directories to the list of
  12. &#8220;favorites&#8221; in jEdit's File System
  13. Browser?</a></dt><dt>Q: <a href="usage.html#id2550598">How do I associate particular file types with jEdit so
  14. I can open them by double clicking their icons in Windows
  15. Explorer?</a></dt><dt>Q: <a href="usage.html#id2550638">Can I restrict jEdit to opening and saving files in a
  16. single directory without changing file permissions?</a></dt><dt>Q: <a href="usage.html#id2550664">On Windows, how can I change the name of my file from
  17. myfile.txt to
  18. MyFile.txt?</a></dt></dl></dd><dt>5. <a href="usage.html#text-format">Formatting text</a></dt><dd><dl><dt>Q: <a href="usage.html#id2550758">How do I indent or unindent selections of text?</a></dt><dt>Q: <a href="usage.html#id2550814">Is there a way to automatically view line numbers when
  19. a buffer is opened?</a></dt><dt>Q: <a href="usage.html#id2550853">Does jEdit know smart quotes? In .tex files I would
  20. like to use `` or
  21. '' instead of
  22. ".</a></dt><dt>Q: <a href="usage.html#id2550918">Does jEdit have a &#8220;soft&#8221; wrap text
  23. mode?</a></dt><dt>Q: <a href="usage.html#id2550971">The display of spaces as a character in the editor is
  24. annoying. How can I disable those small square boxes?</a></dt><dt>Q: <a href="usage.html#id2551010">Does jEdit support i18n?</a></dt><dt>Q: <a href="usage.html#id2551063">When using soft wrap, why does it scroll per physical
  25. line and not screen line?</a></dt></dl></dd><dt>6. <a href="usage.html#text-print">Printing text</a></dt><dd><dl><dt>Q: <a href="usage.html#id2551096">What can I do to improve printing performance?</a></dt></dl></dd><dt>7. <a href="usage.html#source-compile">Compiling source code</a></dt><dd><dl><dt>Q: <a href="usage.html#id2551180">How do I compile my Java source in JEdit?</a></dt><dt>Q: <a href="usage.html#id2551259">How do I create a new edit mode?</a></dt><dt>Q: <a href="usage.html#id2551287">Does jEdit support DocBook tags?</a></dt></dl></dd><dt>8. <a href="usage.html#emacs-tricks">Tips for Emacs users</a></dt><dd><dl><dt>Q: <a href="usage.html#id2551357">Can I have an emacs style tab key (tab anywhere in a
  26. line re-indents it)?</a></dt><dt>Q: <a href="usage.html#id2551393">How do I map Ctrl-E to go to the end of the
  27. line?</a></dt><dt>Q: <a href="usage.html#id2551498">What about ctrl-K?</a></dt></dl></dd><dt>9. <a href="usage.html#customize-other">Other Settings and Options</a></dt><dd><dl><dt>Q: <a href="usage.html#id2551531">How can I change the font used for menu labels and
  28. other elements of jEdit's user interface?</a></dt><dt>Q: <a href="usage.html#id2551574">I want to add a directory to the classpath. I did this
  29. in the standalone BeanShell with ease by using the
  30. addClassPath(String) method. but this
  31. doesn't work in a macro. How could I manage the classpath in
  32. jEdit?</a></dt><dt>Q: <a href="usage.html#id2551611">Are there any hidden features?</a></dt></dl></dd></dl><table border="0" summary="Q and A Set"><col align="left" width="1%"><tbody><tr class="qandadiv"><td align="left" valign="top" colspan="2"><h4 class="title"><a name="text-abbrev"></a>1. Abbreviations</h4></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>Q: <a href="usage.html#id2549994">How can I create abbreviations &#8220;on the
  33. fly&#8221; as I type?</a></dt><dt>Q: <a href="usage.html#id2550063">How can I have abbreviations expanded automatically as
  34. I type?</a></dt></dl></td></tr><tr class="question"><td align="left" valign="top"><a name="id2549994"></a><a name="abbrevs-create-onfly"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>How can I create abbreviations &#8220;<span class="quote">on the
  35. fly</span>&#8221; as I type?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>Type the form of abbreviation you wish to use, then
  36. without pressing the <code class="keycap">SPACE</code> key, press
  37. <code class="keycap">CTRL</code>+<code class="keycap">;</code>. A dialog will appear for entering text that
  38. goes before and after the editing caret. For example, you
  39. can insert an opening HTML or XML tag before the cursor and
  40. its corresponding closing tag after the cursor. Use the
  41. mouse to select <span class="guilabel"><strong>Add global</strong></span> or
  42. <span class="guilabel"><strong>Add mode-specific</strong></span>. The first choice
  43. makes the abbreviation available for all documents; the
  44. second makes it available only in documents with the same
  45. editing mode as the current document. In this way, you can
  46. add abbreviations that operate only a particular class of
  47. documents, for example, Java source files or XML markup.
  48. Either way, the abbreviation will be stored for future
  49. use.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2550063"></a><a name="abbrevs-expand-type"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>How can I have abbreviations expanded automatically as
  50. I type?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>Select
  51. <span class="guimenu"><strong>Utilities</strong></span>&gt;<span class="guimenuitem"><strong>Global
  52. Options</strong></span>, then select the
  53. <span class="guimenuitem"><strong>Abbreviations</strong></span> option pane. You
  54. will see a checkbox option for &#8220;<span class="quote">Space bar expands
  55. abbrevs</span>&#8221;. Here you can also add, modify and delete
  56. abbreviations on a global basis or for individual editing
  57. modes.</p></td></tr><tr class="qandadiv"><td align="left" valign="top" colspan="2"><h4 class="title"><a name="text-clipboard"></a>2. Clipboard features</h4></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>Q: <a href="usage.html#id2550120">Can I copy selections from more than one location in a
  58. document (or more than one document) and paste the aggregate
  59. text in one operation?</a></dt></dl></td></tr><tr class="question"><td align="left" valign="top"><a name="id2550120"></a><a name="clip-multiple"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>Can I copy selections from more than one location in a
  60. document (or more than one document) and paste the aggregate
  61. text in one operation?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>The <span class="guimenuitem"><strong>Cut Append</strong></span> (<code class="keycap">CTRL</code>+<code class="keycap">E</code> <code class="keycap">CTRL</code>+<code class="keycap">U</code>) and <span class="guimenuitem"><strong>Copy Append</strong></span>
  62. (<code class="keycap">CTRL</code>+<code class="keycap">E</code> <code class="keycap">CTRL</code>+<code class="keycap">A</code>) both add the selected text to the existing
  63. contents of the Clipboard. A single
  64. <span class="guimenuitem"><strong>Paste</strong></span> (<code class="keycap">CTRL</code>+<code class="keycap">V</code>) command will insert the aggregated text at
  65. the cursor or in place of an existing selection.</p></td></tr><tr class="qandadiv"><td align="left" valign="top" colspan="2"><h4 class="title"><a name="file-attributes"></a>3. File Attributes</h4></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>Q: <a href="usage.html#id2550261">Does jEdit preserve file ownership and permissions
  66. when it saves files?</a></dt><dt>Q: <a href="usage.html#id2550321">Why does jEdit ignore my choice for line separator
  67. characters when I save a file?</a></dt><dt>Q: <a href="usage.html#id2550345">Can jEdit auto-detect character encodings when it
  68. opens a file?</a></dt><dt>Q: <a href="usage.html#id2550431">I'm using the iso-8859-1 character encoding. How do I
  69. type and save the Euro sign (&#8220;&#8364;&#8221;)?</a></dt></dl></td></tr><tr class="question"><td align="left" valign="top"><a name="id2550261"></a><a name="file-owner-preserve"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>Does jEdit preserve file ownership and permissions
  70. when it saves files?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>One reason this can be an issue is that by default,
  71. jEdit adopts the conservative approach of saving a file to a
  72. temporary name before renaming that file to the desired
  73. name. This procedure minimizes the risk of crashes causing
  74. loss of data, and works without reported problems on local
  75. file systems. However, when files are served remotely by
  76. FTP, Samba or other means, it may not be possible to
  77. preserve file attributes on the server because the newly
  78. created temporary file's owner may differ from the owner of
  79. the original file on the server.</p><p>To avoid this problem, you can disable the two-step
  80. file saving routine. Select
  81. <span class="guimenu"><strong>Utilities</strong></span>&gt;<span class="guimenuitem"><strong>Global
  82. Options</strong></span>, then under <span class="guimenuitem"><strong>Loading &amp;
  83. Saving</strong></span>, clear the checkbox for
  84. <span class="guimenuitem"><strong>Two-stage save</strong></span>.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2550321"></a><a name="file-linesep-choice"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>Why does jEdit ignore my choice for line separator
  85. characters when I save a file?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>When jEdit saves an existing file, it uses the line
  86. separator already used by the file. The line separator
  87. designated in the buffer options or elsewhere is used only
  88. for new files.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2550345"></a><a name="file-autodetect-encoding"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>Can jEdit auto-detect character encodings when it
  89. opens a file?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>Only Unicode can be detected when a file is loaded.
  90. For other encodings, you must specify the encoding when the
  91. file is loaded if you do not wish to use the default
  92. encoding for your operating system.</p><p>There are a few features that can help you navigate
  93. through encoding issues. You can select the encoding you
  94. wish to use from <span class="guisubmenu"><strong> Encoding</strong></span> in the
  95. <span class="guimenu"><strong>Commands</strong></span> menu of the File System Browser.
  96. You can also designate a default encoding in the
  97. <span class="guimenuitem"><strong>Loading &amp; Saving</strong></span> pane of the
  98. Global Options dialog; if you do not, jEdit adopts your
  99. operating system's default encoding as its own default. You
  100. can change the encoding used to save an individual file by
  101. selecting
  102. <span class="guimenu"><strong>Utilities</strong></span>&gt;<span class="guimenuitem"><strong>Buffer
  103. Options</strong></span> and changing the current buffer's
  104. properties. Finally, jEdit keeps track of the encodings used
  105. in the files named in the
  106. <span class="guimenu"><strong>File</strong></span>&gt;<span class="guimenuitem"><strong>Recent
  107. Files</strong></span> drop-down list.</p><p>These features allow you to minimize the attention
  108. given to character encodings, but you must still pay some
  109. attention if you do not want to use default settings.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2550431"></a><a name="file-euro-char"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>I'm using the iso-8859-1 character encoding. How do I
  110. type and save the Euro sign (&#8220;<span class="quote">&#8364;</span>&#8221;)?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>You need to use instead the iso-8859-15 character set,
  111. which is a modification of iso-8859-1 that includes the Euro
  112. sign and some Finnish and French characters. The Euro sign
  113. represents character value 0xA4 in this 8-bit set. To open a
  114. file manually using this encoding, select
  115. <span class="guimenu"><strong>File</strong></span>&gt;<span class="guimenuitem"><strong>Open...
  116. </strong></span>, and select
  117. <span class="guimenuitem"><strong>ISO8859_15</strong></span> from <span class="guimenu"><strong>
  118. Commands</strong></span>&gt;<span class="guisubmenu"><strong>Enconding</strong></span>
  119. before opening the file.</p><p>There is a startup script in the
  120. &#8220;<span class="quote">Downloads</span>&#8221; area of <a class="ulink" href="http://community.jedit.org" target="_top">jEdit Community</a>
  121. named <code class="filename">euro.bsh</code> that can be used as a
  122. startup script to help simplify the insertion of the Euro
  123. symbol if your keyboard currently lacks a dedicated
  124. key.</p></td></tr><tr class="qandadiv"><td align="left" valign="top" colspan="2"><h4 class="title"><a name="file-manage"></a>4. File Management</h4></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>Q: <a href="usage.html#id2550524">How can I open files in jEdit using drag and
  125. drop?</a></dt><dt>Q: <a href="usage.html#id2550547">How do I add and remove directories to the list of
  126. &#8220;favorites&#8221; in jEdit's File System
  127. Browser?</a></dt><dt>Q: <a href="usage.html#id2550598">How do I associate particular file types with jEdit so
  128. I can open them by double clicking their icons in Windows
  129. Explorer?</a></dt><dt>Q: <a href="usage.html#id2550638">Can I restrict jEdit to opening and saving files in a
  130. single directory without changing file permissions?</a></dt><dt>Q: <a href="usage.html#id2550664">On Windows, how can I change the name of my file from
  131. myfile.txt to
  132. MyFile.txt?</a></dt></dl></td></tr><tr class="question"><td align="left" valign="top"><a name="id2550524"></a><a name="open-dnd"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>How can I open files in jEdit using drag and
  133. drop?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>Try installing the Drag and Drop plugin using the
  134. Plugin Manager feature. It works with most (but not all)
  135. combinations of operating systems and current Java runtime
  136. environments.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2550547"></a><a name="add-favorites"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>How do I add and remove directories to the list of
  137. &#8220;<span class="quote">favorites</span>&#8221; in jEdit's File System
  138. Browser?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>To add a directory to the list of favorites, navigate
  139. so that the directory is at the top of the tree displayed in
  140. the File System Browser window, click the
  141. <span class="guimenuitem"><strong>Favorites</strong></span> button, and select
  142. <span class="guimenuitem"><strong>Add to favorites</strong></span> from the
  143. resulting menu. To delete a directory from the favorites
  144. list, use the same menu to go to the favorites list.
  145. Right-click on the directory to be deleted and select
  146. <span class="guimenuitem"><strong>Delete</strong></span>. This operation will
  147. delete the directory from the list of favorites but will
  148. have no effect on the directory itself.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2550598"></a><a name="associate-files"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>How do I associate particular file types with jEdit so
  149. I can open them by double clicking their icons in Windows
  150. Explorer?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>You associate the file extension with
  151. <strong class="userinput"><em class="replaceable"><code>&lt;jEdit installation
  152. directory&gt;</code></em><code>\jedit.bat</code></strong>.
  153. This can be done from the <span class="guimenuitem"><strong>File Types</strong></span>
  154. tab in the Windows Explorer's <span class="guimenuitem"><strong>Tools</strong></span>
  155. -&gt; <span class="guimenuitem"><strong>Folder options...</strong></span> menu.</p><p>The EXE-installer for Windows includes a
  156. custom context menu handler. It will provide menu items for
  157. using jEdit any time you right-click on a file icon in
  158. Windows Explorer. This feature does
  159. not interfere with any existing file associations.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2550638"></a><a name="open-restrict-dir"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>Can I restrict jEdit to opening and saving files in a
  160. single directory without changing file permissions?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>The easiest way to get this kind of behavior is to use
  161. macros that open the Virtual File Browser to a specific,
  162. fixed directory, and then change the default keyboard
  163. shortcuts for opening and saving files to run these
  164. macros.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2550664"></a><a name="filename-uc-to-lc"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>On Windows, how can I change the name of my file from
  165. <code class="filename">myfile.txt</code> to
  166. <code class="filename">MyFile.txt</code>?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>The Windows native file system deals with file names
  167. in a case-insensitive manner, so
  168. <code class="filename">myfile.txt</code> and
  169. <code class="filename">MyFile.txt</code> refer to the same file. As a
  170. result, the jEdit file browser treats both spellings
  171. identically and does not make a name change. Using our
  172. example, the easiest workaround is to rename the file in two
  173. steps: first to <code class="filename">_myfile.txt</code>, then to
  174. <code class="filename">MyFile.txt</code>.</p></td></tr><tr class="qandadiv"><td align="left" valign="top" colspan="2"><h4 class="title"><a name="text-format"></a>5. Formatting text</h4></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>Q: <a href="usage.html#id2550758">How do I indent or unindent selections of text?</a></dt><dt>Q: <a href="usage.html#id2550814">Is there a way to automatically view line numbers when
  175. a buffer is opened?</a></dt><dt>Q: <a href="usage.html#id2550853">Does jEdit know smart quotes? In .tex files I would
  176. like to use `` or
  177. '' instead of
  178. ".</a></dt><dt>Q: <a href="usage.html#id2550918">Does jEdit have a &#8220;soft&#8221; wrap text
  179. mode?</a></dt><dt>Q: <a href="usage.html#id2550971">The display of spaces as a character in the editor is
  180. annoying. How can I disable those small square boxes?</a></dt><dt>Q: <a href="usage.html#id2551010">Does jEdit support i18n?</a></dt><dt>Q: <a href="usage.html#id2551063">When using soft wrap, why does it scroll per physical
  181. line and not screen line?</a></dt></dl></td></tr><tr class="question"><td align="left" valign="top"><a name="id2550758"></a><a name="text-indent"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>How do I indent or unindent selections of text?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>Using jEdit's default configuration, you can indent a
  182. selection of text by pressing <code class="keycap">ALT</code>+<code class="keycap">RIGHT</code>. Unindent a selection by pressing <code class="keycap">ALT</code>+<code class="keycap">LEFT</code>.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2550814"></a><a name="text-line-numbers"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>Is there a way to automatically view line numbers when
  183. a buffer is opened?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p><span class="guimenuitem"><strong>Select Utilities&gt;Global
  184. Options</strong></span>, and in the
  185. <span class="guimenuitem"><strong>Gutter</strong></span> option pane select the
  186. <span class="guimenuitem"><strong>Line Numbering</strong></span> check box.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2550853"></a><a name="smart-quote"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>Does jEdit know smart quotes? In .tex files I would
  187. like to use <strong class="userinput"><code>``</code></strong> or
  188. <strong class="userinput"><code>''</code></strong> instead of
  189. <strong class="userinput"><code>"</code></strong>.</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>While jEdit can display any character provided by a
  190. supported encoding set and enter any character supported by
  191. a keyboard driver, it does not have the ability to insert
  192. &#8220;<span class="quote">smart quote</span>&#8221; pairs automatically as some word
  193. processors do. This would require a BeanShell macro to
  194. modify quoted text.</p><p>The Accents and CharacterMap plugins can also help you
  195. type international characters.</p><p>You also have the option of using a TeX macro (or, in
  196. LaTeX, a pair of environment tags) to have the standard
  197. double quotation mark <strong class="userinput"><code>"</code></strong> transformed
  198. into the appropriate opening or closing smart quotes without
  199. the need to keep track of when quoted text opens or
  200. closes.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2550918"></a><a name="text-softwrap"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>Does jEdit have a &#8220;<span class="quote">soft</span>&#8221; wrap text
  201. mode?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>jEdit's 4.3's soft wrap mode, and especially its wrap
  202. to margin=0, is one of its many features that just works
  203. better than it does in most other editing environments. Soft
  204. Wrap with margin=0 was unavailable in jEdit 4.2, but users
  205. of 4.1 will remember it well. When you set SOFT WRAP with a
  206. margin=0, you don't need to use the horizontal scroller
  207. anymore. It's just as simple as that.</p><p>jEdit wrap capability can be activated for a specific
  208. buffer, specific editing modes, or for all documents by
  209. default. In prior versions, both the text wrap feature and
  210. the <span class="guimenuitem"><strong>Edit&gt;Text&gt;Format
  211. Paragraph</strong></span> command insert &#8220;<span class="quote">hard</span>&#8221;
  212. end of line characters. This &#8220;<span class="quote">hard wrap</span>&#8221;
  213. feature remains available as an option for buffers and
  214. editing modes.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2550971"></a><a name="text-display-spaces"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>The display of spaces as a character in the editor is
  215. annoying. How can I disable those small square boxes?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>This is controlled by the WhiteSpace plugin. To change
  216. your settings to disable display of whitespace characters,
  217. select <span class="guimenuitem"><strong>Utilities&gt;Global
  218. Options</strong></span>, then select <span class="guimenuitem"><strong>Plugin
  219. options&gt;WhiteSpace</strong></span>. You can separately
  220. configure the display of spaces, tabs, and other whitespace
  221. characters.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2551010"></a><a name="text-i18n"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>Does jEdit support i18n?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>When editing text documents, jEdit supports any
  222. available encoding scheme, and can open files with a
  223. specified encoding other than the default encoding of your
  224. operating system using the
  225. <span class="guimenu"><strong>Commands</strong></span>&gt;<span class="guisubmenu"><strong>Encoding
  226. </strong></span> from the File System Browser.</p><p>With respect to menu labels, message strings and other
  227. GUI elements, the jEdit project team currently does not have
  228. the resources to maintain multiple property sets in
  229. languages other than English, particularly since the
  230. development effort is continuing at a rapid pace. There has
  231. not been great demand for this in any event. This may be
  232. because jEdit is primarily a tool for programmers, and the
  233. use of English as a common first or second language is
  234. widespread in the global programming community. This
  235. decision may be reconsidered when the application has
  236. further matured and if more individuals express a
  237. willingness to be involved in translation work.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2551063"></a><a name="text-wrap"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>When using soft wrap, why does it scroll per physical
  238. line and not screen line?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>This will change in jEdit 4.2.</p></td></tr><tr class="qandadiv"><td align="left" valign="top" colspan="2"><h4 class="title"><a name="text-print"></a>6. Printing text</h4></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>Q: <a href="usage.html#id2551096">What can I do to improve printing performance?</a></dt></dl></td></tr><tr class="question"><td align="left" valign="top"><a name="id2551096"></a><a name="text-print-improve"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>What can I do to improve printing performance?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>Prior to release of version 1.4 of the Java
  239. Development Kit (JDK), printing has been one of the weak
  240. areas of the Java platform. If you are using JDK version
  241. 1.3, here are a few suggestions on improving printing
  242. performance.</p><p>One simple way to improve printing is to use the
  243. InfoViewer plugin to display and print a text file in your
  244. favorite Web browser. You can also write a macro that saves
  245. a buffer and then passes the buffer's file name (using the
  246. method <code class="filename">buffer.getPath()</code>) to an external
  247. print utility. The file <code class="filename">prettyprint.bat</code>
  248. in the Downloads section of <a class="ulink" href="http://community.jedit.org" target="_top">jEdit Community</a> is
  249. an example of this approach using a Windows batch file and
  250. Ghostscript. You can then change the <code class="keycap">CTRL</code>+<code class="keycap">P</code> keyboard shortcut to point to your printing
  251. macro.</p></td></tr><tr class="qandadiv"><td align="left" valign="top" colspan="2"><h4 class="title"><a name="source-compile"></a>7. Compiling source code</h4></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>Q: <a href="usage.html#id2551180">How do I compile my Java source in JEdit?</a></dt><dt>Q: <a href="usage.html#id2551259">How do I create a new edit mode?</a></dt><dt>Q: <a href="usage.html#id2551287">Does jEdit support DocBook tags?</a></dt></dl></td></tr><tr class="question"><td align="left" valign="top"><a name="id2551180"></a><a name="compile-java"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>How do I compile my Java source in JEdit?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>There are a number of plugins that you can use to
  252. compile Java source code. You can run a Java compiler on the
  253. command line in the &#8220;<span class="quote">System</span>&#8221; shell of the
  254. <span class="application">Console</span> plugin. If you are using
  255. the JCompiler plugin, you will have a
  256. &#8220;<span class="quote">JCompiler</span>&#8221; shell in the
  257. <span class="application">Console</span> plugin, and you can run
  258. the <strong class="userinput"><code>compile</code></strong> command for the current
  259. file, or the <strong class="userinput"><code>compilepkg</code></strong> command on
  260. all of the current directory's source code files. You can
  261. also use the &#8220;<span class="quote">Ant</span>&#8221; commandos from the
  262. <span class="application">Console</span> plugin or the
  263. <span class="application">AntFarm</span> plugin to run complex
  264. builds on a project of source code files, using a
  265. <code class="filename">build.xml</code> file to specify build
  266. commands and dependencies.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2551259"></a><a name="source-new-editmode"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>How do I create a new edit mode?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>Take a look at the &#8220;<span class="quote">Writing Edit Modes</span>&#8221;
  267. section of the User's Guide. Basically, you have to write an
  268. XML file containing data on the mode's file extensions and
  269. buffer and syntax highlighting properties, then add
  270. information about the new mode file to a second XML file
  271. containing a catalog of modes.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2551287"></a><a name="source-docbook"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>Does jEdit support DocBook tags?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>The application contains editing modes for both SGML
  272. and XML. Using jEdit abbreviations, you can quickly insert
  273. commonly-typed tags with a couple of keystroke. There are a
  274. number of abbreviations in the XML and SGML modes that
  275. create pairs of DocBook tags on the fly.</p><p>You can get validation, tree-browsing, auto-complete,
  276. and auto-closing tags with the XML plugin, a very advanced
  277. XML editing tool.</p><p>With whe XInsert or Template plugin you can create
  278. multi-layered DocBook elements.</p><p>There are other macros targeting DocBook available
  279. from the <a class="ulink" href="http://community.jedit.org" target="_top">jEdit
  280. Community</a> web site that you can use or adapt for
  281. your own purposes.</p></td></tr><tr class="qandadiv"><td align="left" valign="top" colspan="2"><h4 class="title"><a name="emacs-tricks"></a>8. Tips for Emacs users</h4></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>Q: <a href="usage.html#id2551357">Can I have an emacs style tab key (tab anywhere in a
  282. line re-indents it)?</a></dt><dt>Q: <a href="usage.html#id2551393">How do I map Ctrl-E to go to the end of the
  283. line?</a></dt><dt>Q: <a href="usage.html#id2551498">What about ctrl-K?</a></dt></dl></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><p>For more emacs help, check out <a class="ulink" href="http://www.clapper.org/software/jedit/" target="_top">this site</a> for
  284. more emacs macros.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2551357"></a><a name="settings-emacstab"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>Can I have an emacs style tab key (tab anywhere in a
  285. line re-indents it)?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>Yes. You can do this by rebinding the
  286. <span class="keycode">tab</span> key to <span class="command"><strong>Indent Selected
  287. Lines</strong></span> in the <span class="guimenuitem"><strong>Global
  288. Options</strong></span>.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2551393"></a><a name="settings-emacsctrle"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>How do I map Ctrl-E to go to the end of the
  289. line?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>jEdit has it set up as a 2-key shortcut. In order to
  290. make Ctrl-E a one-key shortcut again, you first have to
  291. redefine all of the Ctrl-E prefix shortcuts to mean
  292. something else.</p><p><code class="literal">jedit_keys.props</code> shows you all of
  293. the current keyboard bindings. As you can see, Ctrl-e is
  294. used for many things in jEdit. If you want to redefine it to
  295. be a single-key shortcut, first thing you need to do is
  296. decide on another Ctrl-key to use as a prefix, to redefine
  297. jEdit's fold features. I recommend using Ctrl-Q as the
  298. prefix, and if you want to use Ctrl-Q to quit, you have to
  299. hit Ctrl-Q twice. Cut and paste the below shortcuts into
  300. your own properties file (while jEdit is not running, of
  301. course).</p><pre class="programlisting">
  302. # emacs end of line
  303. end.shortcut2=C+e
  304. # Ctrl-Q twice to quit
  305. exit.shortcut=C+q C+q
  306. # C+q is our new C+e prefix
  307. #{{{ C+q C+X
  308. # Unused: f, h, q, y
  309. copy-append.shortcut=C+q C+a
  310. search-in-open-buffers.shortcut=C+q C+b
  311. range-comment.shortcut=C+q C+c
  312. search-in-directory.shortcut=C+q C+d
  313. replace-and-find-next.shortcut=C+q C+g
  314. ignore-case.shortcut=C+q C+i
  315. scroll-to-current-line.shortcut=C+q C+j
  316. line-comment.shortcut=C+q C+k
  317. select-line-range.shortcut=C+q C+l
  318. add-marker.shortcut=C+q C+m
  319. center-caret.shortcut=C+q C+n
  320. open-path.shortcut=C+q C+o
  321. vertical-paste.shortcut=C+q C+p
  322. replace-in-selection.shortcut=C+q C+r
  323. save-all.shortcut=C+q C+s
  324. toggle-line-numbers.shortcut=C+q C+t
  325. cut-append.shortcut=C+q C+u
  326. paste-previous.shortcut=C+q C+v
  327. close-all.shortcut=C+q C+w
  328. regexp.shortcut=C+q C+x
  329. paste-deleted.shortcut=C+q C+y
  330. redo.shortcut=C+q C+z
  331. #}}}
  332. #{{{ C+q C+non-alpha
  333. left-docking-area.shortcut=C+q C+LEFT
  334. top-docking-area.shortcut=C+q C+UP
  335. right-docking-area.shortcut=C+q C+RIGHT
  336. bottom-docking-area.shortcut=C+q C+DOWN
  337. prev-marker.shortcut=C+q C+COMMA
  338. next-marker.shortcut=C+q C+PERIOD
  339. prev-bracket.shortcut=C+q C+OPEN_BRACKET
  340. next-bracket.shortcut=C+q C+CLOSE_BRACKET
  341. close-docking-area.shortcut=C+q C+BACK_QUOTE
  342. #}}}
  343. #{{{ C+q X
  344. # Unused: b e g h j k m o q t y z
  345. add-explicit-fold.shortcut=C+q a
  346. collapse-all-folds.shortcut=C+q c
  347. delete-paragraph.shortcut=C+q d
  348. format-paragraph.shortcut=C+q f
  349. find-previous.shortcut=C+q g
  350. invert-selection.shortcut=C+q i
  351. select-line.shortcut=C+q l
  352. narrow-to-fold.shortcut=C+q n n
  353. narrow-to-selection.shortcut=C+q n s
  354. select-paragraph.shortcut=C+q p
  355. remove-trailing-ws.shortcut=C+q r
  356. select-fold.shortcut=C+q s
  357. insert-literal.shortcut=C+q v
  358. select-word.shortcut=C+q w
  359. parent-fold.shortcut=C+q u
  360. expand-all-folds.shortcut=C+q x
  361. #}}}
  362. </pre></td></tr><tr class="question"><td align="left" valign="top"><a name="id2551498"></a><a name="emacs-ctrl-k"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>What about ctrl-K?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>Check out <code class="literal">macros/Emacs_Ctrl_K.bsh</code>.
  363. Bind it to Ctrl-k from the shortcuts option pane.</p></td></tr><tr class="qandadiv"><td align="left" valign="top" colspan="2"><h4 class="title"><a name="customize-other"></a>9. Other Settings and Options</h4></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>Q: <a href="usage.html#id2551531">How can I change the font used for menu labels and
  364. other elements of jEdit's user interface?</a></dt><dt>Q: <a href="usage.html#id2551574">I want to add a directory to the classpath. I did this
  365. in the standalone BeanShell with ease by using the
  366. addClassPath(String) method. but this
  367. doesn't work in a macro. How could I manage the classpath in
  368. jEdit?</a></dt><dt>Q: <a href="usage.html#id2551611">Are there any hidden features?</a></dt></dl></td></tr><tr class="question"><td align="left" valign="top"><a name="id2551531"></a><a name="settings-change-font"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>How can I change the font used for menu labels and
  369. other elements of jEdit's user interface?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>Select
  370. <span class="guimenu"><strong>Utilities</strong></span>&gt;<span class="guimenuitem"><strong>Global
  371. Options</strong></span>, then the
  372. <span class="guimenuitem"><strong>Appearance</strong></span> option pane. When you
  373. select the &#8220;<span class="quote">Metal</span>&#8221; look and feel you can also
  374. select the fonts used for various displayed items.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2551574"></a><a name="settings-add-classpath"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>I want to add a directory to the classpath. I did this
  375. in the standalone BeanShell with ease by using the
  376. <code class="classname">addClassPath(String)</code> method. but this
  377. doesn't work in a macro. How could I manage the classpath in
  378. jEdit?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>The implementation of BeanShell used in jEdit does not
  379. use BeanShell's class loader. The script method contained in
  380. loadJarClasses.bsh (found in the Downloads section of <a class="ulink" href="http://community.jedit.org" target="_top">jEdit Community</a>)
  381. should work if you know the path to a specific class file or
  382. class archive.</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2551611"></a><a name="settings-unlisted"></a><p><b>Q:</b></p></td><td align="left" valign="top"><p>Are there any hidden features?</p></td></tr><tr class="answer"><td align="left" valign="top"><p><b>A:</b></p></td><td align="left" valign="top"><p>Yes. You can access them by binding a shortcut to the
  383. action in question. You will find a complete list of
  384. available commands under the
  385. <span class="guimenuitem"><strong>Shortcuts</strong></span> area in the
  386. <span class="guimenuitem"><strong>Global Options</strong></span>.</p></td></tr></tbody></table></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="installation.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="macros.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Installation Questions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Macros</td></tr></table></div></body></html>