PageRenderTime 42ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 1ms

/jEdit/tags/jedit-4-2-pre4/doc/users-guide/starting.xml

#
XML | 406 lines | 397 code | 6 blank | 3 comment | 0 complexity | 13dc8f5498070ce06fa5a69e93467131 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. <!-- :xml.root=users-guide.xml: -->
  4. <chapter id="starting"><title>Starting jEdit</title>
  5. <sect1 id="conventions"><title>Conventions</title>
  6. <para>
  7. Several conventions are used throughout jEdit's user interface and
  8. this manual. They will be described here. Macintosh users should note how their modifier keys map to the terms used in the manual.
  9. </para>
  10. <informaltable>
  11. <tgroup cols="2">
  12. <tbody>
  13. <row>
  14. <entry>
  15. <guimenu>View</guimenu>&gt;<guisubmenu>Scrolling</guisubmenu>&gt;<guimenuitem>Scroll
  16. to Current Line</guimenuitem>
  17. </entry>
  18. <entry>
  19. The <guimenuitem>Scroll to Current
  20. Line</guimenuitem> command contained in the
  21. <guisubmenu>Scrolling</guisubmenu> submenu of the <guimenu>View</guimenu> menu.
  22. </entry>
  23. </row>
  24. <row>
  25. <entry>
  26. <guimenu>Edit</guimenu>&gt;<guimenuitem>Go to Line...</guimenuitem>
  27. </entry>
  28. <entry>
  29. Menu items that end with
  30. ellipsis (...) display dialog boxes.
  31. </entry>
  32. </row>
  33. <row>
  34. <entry><keycap>Control</keycap> or <keycap>C</keycap></entry>
  35. <entry>
  36. The primary modifier key in jEdit. On MacOS X, this is actually the
  37. key known as <quote>Command</quote>. On most other keyboards, this key is
  38. labelled <quote>Control</quote>.
  39. </entry>
  40. </row>
  41. <row>
  42. <entry><keycap>Alt</keycap> or <keycap>A</keycap></entry>
  43. <entry>
  44. The secondary modifier key in jEdit. On MacOS X, this is actually the
  45. key labelled <quote>Control</quote>. On most other keyboards, this key is
  46. labelled <quote>Alt</quote>.
  47. </entry>
  48. </row>
  49. <row>
  50. <entry><keycap>Shift</keycap> or <keycap>S</keycap></entry>
  51. <entry>The standard <quote>Shift</quote> key.
  52. </entry>
  53. </row>
  54. <row>
  55. <entry>
  56. <keycombo><keycap>Control</keycap><keycap>O</keycap></keycombo>
  57. </entry>
  58. <entry>
  59. Refers to pressing and holding the <keycap>Control</keycap> key, pressing and releasing <keycap>O</keycap>, and finally releasing the <keycap>Control</keycap> key again.
  60. </entry>
  61. </row>
  62. <row>
  63. <entry>
  64. <keycombo><keycap>Control</keycap><keycap>E</keycap></keycombo>
  65. <keycombo><keycap>Control</keycap><keycap>J</keycap></keycombo>
  66. </entry>
  67. <entry>
  68. Command shortcuts can consist of more than one keypress. To invoke the command with the example shortcut above,
  69. press <keycombo><keycap>Control</keycap><keycap>E</keycap></keycombo>, and follow it with
  70. <keycombo><keycap>Control</keycap><keycap>J</keycap></keycombo>.
  71. </entry>
  72. </row>
  73. <row>
  74. <entry>
  75. Default buttons
  76. </entry>
  77. <entry>
  78. In many dialog boxes, the default button (it has a heavy outline, or a
  79. special border, depending on the current Swing look and feel) can be activated by
  80. pressing <keycap>Enter</keycap>. Similarly, pressing
  81. <keycap>Escape</keycap> will usually close a dialog box.
  82. </entry>
  83. </row>
  84. <row>
  85. <entry>
  86. <keycap>Alt</keycap>-key mnemonics
  87. </entry>
  88. <entry>
  89. Some user interface elements (menus, menu items, buttons) have a
  90. certain letter in their label underlined. Pressing this letter in combination
  91. with the <keycap>Alt</keycap> key activates the associated user interface
  92. widget. Note that this functionality is not available on MacOS X with the <quote>MacOS Adaptive</quote> look and feel. See <xref linkend="appearance-pane" /> for information on chang,ing the look and feel.
  93. </entry>
  94. </row>
  95. <row>
  96. <entry>
  97. Right mouse button
  98. </entry>
  99. <entry>
  100. Used in jEdit to show context-sensitive menus. If you have a one button Macintosh mouse, a <keycap>Control</keycap>-click has the same effect.
  101. </entry>
  102. </row>
  103. <row>
  104. <entry>
  105. Middle mouse button
  106. </entry>
  107. <entry>
  108. Used by the quick copy feature (see <xref linkend="quick-copy"/>). On a Macintosh with a one or two button mouse, <keycap>Option</keycap>-click. On other platforms with a one or two button mouse, <keycap>Alt</keycap>-click.
  109. </entry>
  110. </row>
  111. </tbody>
  112. </tgroup>
  113. </informaltable>
  114. </sect1>
  115. <sect1 id="starting-any-os"><title>Platform-Independent Instructions</title>
  116. <para>
  117. Exactly how jEdit is started depends on the operating system. For example, on Unix you can run <quote>jedit</quote> at the command line,
  118. or select jEdit from a menu; on Windows, you can
  119. use the jEditLauncher package, which is documented in
  120. <xref linkend="starting-windows" />.
  121. </para>
  122. <para>
  123. If jEdit is started while another copy is already running, control is
  124. transferred to the running copy, and a second instance is not loaded.
  125. This saves time and memory if jEdit is started multiple times.
  126. Communication between instances of jEdit is implemented using
  127. TCP/IP sockets; the initial instance is known as the
  128. <firstterm>server</firstterm>, and subsequent invocations are
  129. <firstterm>clients</firstterm>.
  130. </para>
  131. <para>
  132. If the <userinput>-background</userinput> command line switch is specified,
  133. jEdit will continue running and waiting for client requests even
  134. after all editor windows are closed. When run in background mode,
  135. you can open and close jEdit any number of times, only having
  136. to wait for it to start the first time. The downside of this
  137. is that jEdit will continue to consume memory when no windows
  138. are open.
  139. </para>
  140. <para>
  141. When running on MacOS X, the <userinput>-background</userinput> command-line switch is active by default, so that jEdit conforms to the platform convention that programs should stay open until the <guimenuitem>Quit</guimenuitem> command is explicitly invoked by the user, even if all windows are closed. To disable background mode on MacOS X, use the <userinput>-nobackground</userinput> switch.
  142. </para>
  143. <para>
  144. For more information about command line switches that control the
  145. server feature, see <xref linkend="cli-usage" />.
  146. Note that if you are using <application>jEditLauncher</application>
  147. to start jEdit on Windows, this switch cannot be specified on the
  148. MS-DOS prompt command line when starting jEdit; it must be set as described
  149. in <xref linkend="launcher-starting" />.
  150. </para>
  151. <para>
  152. jEdit remembers open buffers, views and split window configurations between editing sessions, so you can get back to work immediately after starting jEdit. This feature can be
  153. disabled in the <guibutton>General</guibutton> pane of the
  154. <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global Options</guimenuitem>
  155. dialog box see <xref linkend="general-pane" />.
  156. </para>
  157. <sidebar><title>The edit server and security</title>
  158. <para>
  159. Not only does the server pick a random TCP port number on startup,
  160. it also requires that clients provide an <firstterm>authorization
  161. key</firstterm>; a randomly-generated number only accessible to
  162. processes running on the local machine.
  163. So not only will <quote>bad guys</quote> have to guess a 64-bit integer,
  164. they will need to get it right on the first try; the edit server
  165. shuts itself off upon receiving an invalid packet.
  166. </para>
  167. <para>
  168. In environments that demand absolute security, the edit server can be
  169. disabled by specifying the <userinput>-noserver</userinput> command line switch.
  170. </para>
  171. </sidebar>
  172. </sect1>
  173. <sect1 id="starting-windows"><title>Starting jEdit on Windows</title>
  174. <para>
  175. On Windows, jEdit comes with <emphasis>jEditLauncher</emphasis> - an optional
  176. package of components that make it easy to start jEdit, manage its command
  177. line settings, and launch files and macro scripts.
  178. </para>
  179. <para>
  180. The jEditLauncher package provides three shortcuts for running jEdit: one in
  181. the desktop's <guilabel>Start</guilabel> menu, a entry in the Programs menu, and
  182. a third shortcut on your desktop. Any of these may be deleted or moved without
  183. affecting jEdit's operation. To launch jEdit, simply select one of these shortcuts
  184. as you would for any Windows application.
  185. </para>
  186. <para>
  187. The jEditLauncher package includes a utility for changing the command line
  188. parameters that are stored with jEditLauncher and used every time it runs jEdit.
  189. You can change the Java interpreter used to launch jEdit, the amount of heap memory,
  190. the working directory and other command line parameters. To make these changes,
  191. select <guilabel>Set jEdit Parameters</guilabel> from the jEdit group in
  192. the Programs menu, or run <userinput>jedit /p</userinput> from a command
  193. line that has jEdit's installation directory in its search path. A dialog
  194. will appear that allows you to change and save a new set of command line
  195. parameters.
  196. </para>
  197. <para>
  198. The package also adds menu items to the context or <quote>right-click</quote>
  199. menu displayed by the Windows shell when you click on a file item in the
  200. desktop window, a Windows Explorer window or a standard file selection dialog.
  201. The menu entries allow you to open selected files in jEdit, starting the
  202. application if necessary. It will also allow you to open all files in a
  203. directory with a given extension with a single menu selection. If a BeanShell
  204. macro script with a <filename>.bsh</filename> extension is selected, the menu
  205. includes the option of running that script within jEdit. If you have the
  206. <application>JDiff</application> plugin installed with jEdit, you can also
  207. select two files and have jEdit compare them in a side-by-side graphical display.
  208. </para>
  209. <para>
  210. For a more detailed description of all features found in
  211. the jEditLauncher package, see <xref linkend="launcher-guide"/>.
  212. </para>
  213. </sect1>
  214. <sect1 id="cli-usage"><title>Command Line Usage</title>
  215. <para>
  216. On operating systems that support a command line, jEdit can be passed
  217. various arguments to control its behavior.
  218. </para>
  219. <para>
  220. If you are using <application>jEditLauncher</application>
  221. to start jEdit on Windows, only file names can be specified
  222. on the command line; the parameters documented below must be set as described
  223. in <xref linkend="launcher-starting" />.
  224. </para>
  225. <para>
  226. When opening files from the command line, a line number or marker to
  227. position the caret on can be specified like so:
  228. </para>
  229. <screen><prompt>$ </prompt><userinput>jedit MyApplet.java +line:10</userinput>
  230. <prompt>$ </prompt><userinput>jedit thesis.tex +marker:c</userinput></screen>
  231. <para>
  232. Command-line switches begin with a "-". Some take a parameter. A file whose name
  233. begins with "-" can be opened like so:
  234. </para>
  235. <screen><prompt>$ </prompt><userinput>jedit -- -myfile</userinput></screen>
  236. <sect2><title>Miscellaneous Options</title>
  237. <informaltable>
  238. <tgroup cols="2">
  239. <colspec colnum="1" colwidth="1.5in" />
  240. <thead>
  241. <row><entry>Option</entry><entry>Effect</entry></row>
  242. </thead>
  243. <tbody>
  244. <row>
  245. <entry><userinput>-log=<replaceable>level</replaceable></userinput></entry>
  246. <entry>Set the minimum log level to an integer between 1 and 9. Default is 7.
  247. Has no effect when connecting to
  248. another instance via the edit server.</entry>
  249. </row>
  250. <row>
  251. <entry><userinput>-usage</userinput></entry>
  252. <entry>Show a brief command line usage message without starting
  253. jEdit.
  254. This message is also shown if an invalid switch was specified.</entry>
  255. </row>
  256. <row>
  257. <entry><userinput>-version</userinput></entry>
  258. <entry>Show the version number without starting jEdit.</entry>
  259. </row>
  260. <row>
  261. <entry><userinput>- -</userinput></entry>
  262. <entry>Specifies the end of command-line processing. Further parameters are treated
  263. as file names, even if they begin with a dash.
  264. </entry>
  265. </row>
  266. </tbody>
  267. </tgroup>
  268. </informaltable>
  269. </sect2>
  270. <sect2><title>Configuration Options</title>
  271. <informaltable>
  272. <tgroup cols="2">
  273. <colspec colnum="1" colwidth="1.5in" />
  274. <thead>
  275. <row><entry>Option</entry><entry>Effect</entry></row>
  276. </thead>
  277. <tbody>
  278. <row>
  279. <entry><userinput>-plugins</userinput></entry>
  280. <entry>Enable loading of plugins. Has no effect
  281. when connecting to another instance via the edit server.
  282. See <xref linkend="using-plugins" />.</entry>
  283. </row>
  284. <row>
  285. <entry><userinput>-noplugins</userinput></entry>
  286. <entry>Disable loading of plugins. Has no effect
  287. when connecting to another instance via the edit server.</entry>
  288. </row>
  289. <row>
  290. <entry><userinput>-restore</userinput></entry>
  291. <entry>Restore previously open files on startup. This is the default.
  292. This feature can also be set permanently in the
  293. <guibutton>General</guibutton> pane of the
  294. <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global Options</guimenuitem>
  295. dialog box; see <xref linkend="general-pane" />.
  296. </entry>
  297. </row>
  298. <row>
  299. <entry><userinput>-norestore</userinput></entry>
  300. <entry>Do not restore previously open files on startup.
  301. </entry>
  302. </row>
  303. <row>
  304. <entry><userinput>-run=<replaceable>script</replaceable></userinput></entry>
  305. <entry>Run the specified BeanShell script. There can only be one
  306. of these parameters on the command line. See
  307. <xref linkend="scripts-command-line" />.</entry>
  308. </row>
  309. <row>
  310. <entry><userinput>-settings=<replaceable>dir</replaceable></userinput></entry>
  311. <entry>Store user-specific settings in
  312. the directory named <replaceable>dir</replaceable>, instead of the
  313. default <filename><replaceable>user.home</replaceable>/.jedit</filename>.
  314. The directory will be created automatically if it does not exist. Has no
  315. effect when connecting to another instance via the edit server.
  316. See <xref linkend="settings-directory"/>.</entry>
  317. </row>
  318. <row>
  319. <entry><userinput>-nosettings</userinput></entry>
  320. <entry>Start jEdit without loading user-specific settings.</entry>
  321. </row>
  322. <row>
  323. <entry><userinput>-startupscripts</userinput></entry>
  324. <entry>Run startup scripts. This is the default.
  325. Has no effect
  326. when connecting to another instance via the edit server.
  327. See <xref linkend="startup-scripts" />.</entry>
  328. </row>
  329. <row>
  330. <entry><userinput>-nostartupscripts</userinput></entry>
  331. <entry>Disable startup scripts.
  332. Has no effect
  333. when connecting to another instance via the edit server.</entry>
  334. </row>
  335. </tbody>
  336. </tgroup>
  337. </informaltable>
  338. </sect2>
  339. <sect2><title>Edit Server Options</title>
  340. See <xref linkend="starting-any-os" /> for a brief description of the edit server.
  341. <informaltable>
  342. <tgroup cols="2">
  343. <colspec colnum="1" colwidth="1.5in" />
  344. <thead>
  345. <row><entry>Option</entry><entry>Effect</entry></row>
  346. </thead>
  347. <tbody>
  348. <row>
  349. <entry><userinput>-background</userinput></entry>
  350. <entry>Run jEdit in background mode. In background mode,
  351. the edit server will continue listening for
  352. client connections even after all views are closed. Has no effect
  353. when connecting to another instance via the edit server.</entry>
  354. </row>
  355. <row>
  356. <entry><userinput>-nobackground</userinput></entry>
  357. <entry>Disable background mode. This is the default.
  358. Has no effect when connecting to
  359. another instance via the edit server.</entry>
  360. </row>
  361. <row>
  362. <entry><userinput>-gui</userinput></entry>
  363. <entry>Open an initial view. This is the
  364. default. Has no effect when connecting to
  365. another instance via the edit server.
  366. </entry>
  367. </row>
  368. <row>
  369. <entry><userinput>-nogui</userinput></entry>
  370. <entry>Do not open an initial view, and instead only open one
  371. when the first client connects. Can only be used in combination with
  372. the <userinput>-background</userinput> switch. You can use this switch to
  373. <quote>pre-load</quote> jEdit when you log in to your computer, for
  374. example. Has no effect when connecting to
  375. another instance via the edit server.
  376. </entry>
  377. </row>
  378. <row>
  379. <entry><userinput>-server</userinput></entry>
  380. <entry>Store the server port info in the file named <filename>server</filename>
  381. inside the settings directory.</entry>
  382. </row>
  383. <row>
  384. <entry><userinput>-server=<replaceable>name</replaceable></userinput></entry>
  385. <entry>Store the server port info in the file named
  386. <replaceable>name</replaceable>. File names for this
  387. parameter are relative to the settings directory.</entry>
  388. </row>
  389. <row>
  390. <entry><userinput>-noserver</userinput></entry>
  391. <entry>Do not attempt to
  392. connect to a running edit server, and do not start one either.
  393. </entry>
  394. </row>
  395. </tbody>
  396. </tgroup>
  397. </informaltable>
  398. </sect2>
  399. </sect1>
  400. </chapter>