PageRenderTime 37ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 0ms

/jEdit/tags/jedit-4-0-pre5/doc/users-guide/starting.xml

#
XML | 297 lines | 289 code | 6 blank | 2 comment | 0 complexity | faa07954c0aa998a54095cedfceaedc0 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. <!-- jEdit buffer-local properties: -->
  2. <!-- :tabSize=1:indentSize=1:noTabs=true: -->
  3. <chapter id="starting"><title>Starting jEdit</title>
  4. <sect1 id="conventions"><title>Conventions</title>
  5. <para>
  6. Several conventions are used throughout jEdit's user interface and
  7. this manual. They will be described here.
  8. </para>
  9. <para>
  10. When a menu item selection is being described, the
  11. top level menu is listed first, followed by successive levels of submenus,
  12. finally followed by the menu item itself. All menu components are separated
  13. by greater-than symbols (<quote>&gt;</quote>). For example,
  14. <guimenu>View</guimenu>&gt;<guisubmenu>Scrolling</guisubmenu>&gt;<guimenuitem>Scroll
  15. to Current Line</guimenuitem> refers to the <guimenuitem>Scroll to Current
  16. Line</guimenuitem> command contained in the
  17. <guisubmenu>Scrolling</guisubmenu> submenu of the <guimenu>View</guimenu> menu.
  18. </para>
  19. <para>
  20. As with many other applications, menu items that end with
  21. ellipsis (...) display dialog boxes or windows when invoked.
  22. </para>
  23. <para>
  24. Many jEdit commands can be also be invoked using keystrokes. This speeds
  25. up editing by letting you keep your hands on the keyboard. Not all
  26. commands with keyboard shortcuts
  27. are accessible with one key stroke; for example, the
  28. keyboard shortcut for <guimenuitem>Scroll to Current Line</guimenuitem> is
  29. <keycombo><keycap>Control</keycap><keycap>E</keycap></keycombo>
  30. <keycombo><keycap>Control</keycap><keycap>J</keycap></keycombo>. That is, you
  31. must first
  32. press <keycombo><keycap>Control</keycap><keycap>E</keycap></keycombo>, followed by
  33. <keycombo><keycap>Control</keycap><keycap>J</keycap></keycombo>.
  34. </para>
  35. <para>
  36. In many dialog boxes, the default button (it has a heavy outline, or a
  37. special border, depending on your look and feel) can be activated by
  38. pressing <keycap>Enter</keycap>. Similarly, pressing
  39. <keycap>Escape</keycap> will usually close a dialog box.
  40. </para>
  41. <para>
  42. Finally, some user interface elements (menus, menu items, buttons) have a
  43. certain letter in their label underlined. Pressing this letter in combination
  44. with the <keycap>Alt</keycap> key activates the associated user interface
  45. widget.
  46. </para>
  47. <sidebar><title>MacOS</title>
  48. <para>
  49. jEdit tries to adapt itself to established conventions when running on
  50. MacOS.
  51. </para>
  52. <para>
  53. If you are using MacOS, mentally substitute the modifier keys you see in
  54. this manual as follows:
  55. </para>
  56. <itemizedlist>
  57. <listitem><para>Read <keycap>Control</keycap> as <keycap>Command</keycap>
  58. </para></listitem>
  59. <listitem><para>Read <keycap>Alt</keycap> as <keycap>Option</keycap>
  60. </para></listitem>
  61. </itemizedlist>
  62. <para>
  63. If you only have a one-button mouse, a right button click (to show a
  64. context menu, and so on) can be simulated by holding down
  65. <keycap>Control</keycap> while clicking. A middle button click (to insert
  66. the most recent selection in the text area) can be simulated by
  67. holding down <keycap>Option</keycap> while clicking.
  68. </para>
  69. </sidebar>
  70. </sect1>
  71. <sect1 id="starting-any-os"><title>Platform-Independent Instructions</title>
  72. <para>
  73. Exactly how jEdit is started depends on the operating system;
  74. on Unix systems, usually you would
  75. run the <quote>jedit</quote> command at the command line,
  76. or select jEdit from a menu; on Windows, you might
  77. use the jEditLauncher package, which is documented in
  78. <xref linkend="starting-windows" />.
  79. </para>
  80. <para>
  81. If jEdit is started while another copy is already running, control is
  82. transferred to the running copy, and a second instance is not loaded.
  83. This saves time and memory if jEdit is started multiple times.
  84. Communication between instances of jEdit is implemented using
  85. TCP/IP sockets; the initial instance is known as the
  86. <firstterm>server</firstterm>, and subsequent invocations are
  87. <firstterm>clients</firstterm>.
  88. </para>
  89. <para>
  90. If the <command>-background</command> command line switch is specified,
  91. jEdit will continue running and waiting for client requests even
  92. after all editor windows are closed. The advantage of background mode
  93. is that you can open and close jEdit any number of times, only having
  94. to wait for it to start the first time. The downside of background
  95. mode is that jEdit will continue to consume memory when no windows
  96. are open.
  97. </para>
  98. <para>
  99. For more information about command line switches that control the
  100. server feature, see <xref linkend="cli-usage" />.
  101. </para>
  102. <para>
  103. Unlike other applications, jEdit automatically loads any files that were
  104. open last time in was used, so you can get back to work immediately, without
  105. having to find the files you are working on first. This feature can be
  106. disabled in the <guibutton>Loading and Saving</guibutton> pane of the
  107. <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global Options</guimenuitem>
  108. dialog box; see <xref linkend="global-opts" />.
  109. </para>
  110. <sidebar><title>The edit server and security</title>
  111. <para>
  112. Not only does the server pick a random TCP port number on startup,
  113. it also requires that clients provide an <firstterm>authorization
  114. key</firstterm>; a randomly-generated number only accessable to
  115. processes running on the local machine.
  116. So not only will <quote>bad guys</quote> have to guess a 64-bit integer,
  117. they will need to get it right on the first try; the edit server
  118. shuts itself off upon receiving an invalid packet.
  119. </para>
  120. <para>
  121. In environments that demand absolute security, the edit server can be
  122. disabled by specifying the <command>-noserver</command> command line switch.
  123. </para>
  124. </sidebar>
  125. </sect1>
  126. <sect1 id="starting-windows"><title>Starting jEdit on Windows</title>
  127. <para>
  128. On Windows, jEdit comes with <emphasis>jEditLauncher</emphasis> - an optional
  129. package of components that make it easy to start jEdit, manage its command
  130. line settings, and launch files and macro scripts.
  131. </para>
  132. <para>
  133. The jEditLauncher package provides three shortcuts for running jEdit: one in
  134. the desktop's <guilabel>Start</guilabel> menu, a entry in the Programs menu, and
  135. a third shortcut on your desktop. Any of these may be deleted or moved without
  136. affecting jEdit's operation. To launch jEdit, simply select one of these shortcuts
  137. as you would for any Windows application.
  138. </para>
  139. <para>
  140. The jEditLauncher package includes a utility for changing the command line
  141. parameters that are stored with jEditLauncher and used everytime it runs jEdit.
  142. You can change the Java interpreter used to launch jEdit, the amount of heap memory,
  143. the working directory and other command line parameters. To make these changes,
  144. select <guilabel>Set jEdit Parameters</guilabel> from the jEdit group in
  145. the Programs menu, or run <userinput>jedit /p</userinput> from a command
  146. line that has jEdit's installation directory in its search path. A dialog
  147. will appear that allows you to change and save a new set of command line
  148. parameters.
  149. </para>
  150. <para>
  151. The package also adds menu items to the context or <quote>right-click</quote>
  152. menu displayed by the Windows shell when you click on a file item in the
  153. desktop window, a Windows Explorer window or a standard file selection dialog.
  154. The menu entries allow you to open selected files in jEdit, starting the
  155. application if necessary. It will also allow you to open all files in a
  156. directory with a given extension with a single menu selection. If a BeanShell
  157. macro script with a <filename>.bsh</filename> extension is selected, the menu
  158. includes the option of running that script within jEdit. If you have the
  159. <application>JDiff</application> plugin installed with jEdit, you can also
  160. select two files and have jEdit compare them in a side-by-side graphical display.
  161. </para>
  162. <para>
  163. For a more detailed description of all features found in
  164. the jEditLauncher package, see <xref linkend="launcher-guide"/>.
  165. </para>
  166. </sect1>
  167. <sect1 id="cli-usage"><title>Command Line Usage</title>
  168. <para>
  169. On operating systems that support a command line, jEdit can be passed
  170. various arguments to control its behavior.
  171. </para>
  172. <para>
  173. If you are using <application>jEditLauncher</application>
  174. to start jEdit on Windows, only file names can be specified
  175. on the command line; the parameters documented below must be set as described
  176. in <xref linkend="launcher-starting" />.
  177. </para>
  178. <para>
  179. When opening files from the command line, a line number or marker to
  180. position the caret on can be specified like so:
  181. </para>
  182. <screen><prompt>$ </prompt><userinput>jedit MyApplet.java +line:10</userinput>
  183. <prompt>$ </prompt><userinput>jedit thesis.tex +marker:c</userinput></screen>
  184. <para>
  185. A number of options can also be specified to control several obscure features.
  186. They are listed in the following table.
  187. </para>
  188. <informaltable>
  189. <tgroup cols="2">
  190. <colspec colnum="1" colwidth="1.5in" />
  191. <thead>
  192. <row><entry>Option</entry><entry>Description</entry></row>
  193. </thead>
  194. <tbody>
  195. <row>
  196. <entry>-background</entry>
  197. <entry>Runs jEdit in background mode. In background mode,
  198. the edit server will continue listening for
  199. client connections even after all views are closed.
  200. See <xref linkend="starting" />.</entry>
  201. </row>
  202. <row>
  203. <entry>-nogui</entry>
  204. <entry>Makes jEdit not open an initial view, and instead only open one
  205. when the first client connects. Can only be used in combination with
  206. the <command>-background</command> switch. You can use this switch to
  207. <quote>pre-load</quote> jEdit when you log in to your computer, for
  208. example.
  209. </entry>
  210. </row>
  211. <row>
  212. <entry>-norestore</entry>
  213. <entry>Disables automatic restore of previously open files on
  214. startup. This feature can also be set permanently in the
  215. <guibutton>Loading and Saving</guibutton> pane of the
  216. <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global Options</guimenuitem>
  217. dialog box; see <xref linkend="global-opts" />.
  218. </entry>
  219. </row>
  220. <row>
  221. <entry>-run=<replaceable>script</replaceable></entry>
  222. <entry>Runs the specified BeanShell script. There can only be one
  223. of these parameters on the command line. See
  224. <xref linkend="scripts-command-line" /> for details.</entry>
  225. </row>
  226. <row>
  227. <entry>-server</entry>
  228. <entry>Stores the server port info in the file named <filename>server</filename>
  229. inside the settings directory.</entry>
  230. </row>
  231. <row>
  232. <entry>-server=<replaceable>name</replaceable></entry>
  233. <entry>Stores the server port info in the file named
  234. <replaceable>name</replaceable>. File names for this
  235. parameter are relative to the settings directory.</entry>
  236. </row>
  237. <row>
  238. <entry>-noserver</entry>
  239. <entry>Does not attempt to
  240. connect to a running edit server, and does not start one either. For
  241. information about the edit server, see <xref linkend="starting" />.</entry>
  242. </row>
  243. <row>
  244. <entry>-settings=<replaceable>dir</replaceable></entry>
  245. <entry>Loads and saves the user-specific settings from
  246. the directory named <replaceable>dir</replaceable>, instead of the
  247. default <filename><replaceable>user.home</replaceable>/.jedit</filename>.
  248. <replaceable>dir</replaceable> will
  249. be created if it does not exist. Has no effect
  250. when connecting to another instance via the edit server.</entry>
  251. </row>
  252. <row>
  253. <entry>-nosettings</entry>
  254. <entry>Starts jEdit without loading user-specific settings.
  255. See <xref linkend="settings-directory" />.</entry>
  256. </row>
  257. <row>
  258. <entry>-noplugins</entry>
  259. <entry>Causes jEdit to not load any plugins.
  260. See <xref linkend="using-plugins" />. Has no effect
  261. when connecting to another instance via the edit server.</entry>
  262. </row>
  263. <row>
  264. <entry>-nostartupscripts</entry>
  265. <entry>Causes jEdit to not run any startup scripts.
  266. See <xref linkend="startup-scripts" />.
  267. Has no effect
  268. when connecting to another instance via the edit server.</entry>
  269. </row>
  270. <row>
  271. <entry>-usage</entry>
  272. <entry>Shows a brief command line usage message without starting
  273. jEdit.
  274. This message is also shown if an invalid switch was specified.</entry>
  275. </row>
  276. <row>
  277. <entry>-version</entry>
  278. <entry>Shows the version number without starting jEdit.</entry>
  279. </row>
  280. <row>
  281. <entry>- -</entry>
  282. <entry>Specifies the end of the command line switches. Further
  283. parameters are treated as file names, even if they begin with
  284. a dash. Can be used to open files whose names start with a
  285. dash, and so on.</entry>
  286. </row>
  287. </tbody>
  288. </tgroup>
  289. </informaltable>
  290. </sect1>
  291. </chapter>