PageRenderTime 44ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/jEdit/tags/jedit-4-5-pre1/doc/users-guide/macro-index.xml

#
XML | 802 lines | 596 code | 200 blank | 6 comment | 0 complexity | e4251d3f68b7bea7be86f456e772e354 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. <?xml version="1.0" encoding="UTF-8"?>
  2. <appendix id="macro-index">
  3. <title>Macros Included With jEdit</title>
  4. <!-- jEdit 4.0 Macro Guide, (C) 2001 John Gellene -->
  5. <!-- jEdit 4.4 Macro Guide, (C) 2010 jedit-devs -->
  6. <!-- jEdit buffer-local properties: -->
  7. <!-- :indentSize=2:noTabs=yes:maxLineLen=80:tabSize=2: -->
  8. <!-- :xml.root=users-guide.xml: -->
  9. <!-- covers index to installed macro set -->
  10. <para>jEdit comes with a large number of sample macros that perform a
  11. variety of tasks. The following index provides short descriptions of each
  12. macro, in some cases accompanied by usage notes.</para>
  13. <para>In addition to the macros included with jEdit, a very large collection
  14. of user-contributed macros is available in the <quote>Downloads</quote>
  15. section of the <ulink
  16. url="http://community.jedit.org">community.jedit.org</ulink> web site. There
  17. are detailed descriptions for each macro as well as a search
  18. facility.</para>
  19. <section id="macros-c" >
  20. <title>C/C++ macros </title>
  21. <para> These macros are useful for C/C++ programming. </para>
  22. <itemizedlist>
  23. <listitem><para> <filename>Include_Guard.bsh</filename> </para>
  24. <para> Inserts conditional preprocessor directives around a header
  25. file, to prevent it from being included multiple times. </para>
  26. <para>The name of the generated preprocessor macro is based on the
  27. buffer's name. </para>
  28. </listitem>
  29. <listitem><para><filename> Toggle_Header_Source</filename></para>
  30. <para> Toggles between the header and the implementation file. Works for .c, .cxx, and .cpp extensions. </para>
  31. </listitem>
  32. </itemizedlist>
  33. </section>
  34. <section id="macros-clipboard">
  35. <title>Clipboard Macros</title>
  36. <para>These macros copy or cut text to the clipboard.</para>
  37. <itemizedlist>
  38. <listitem>
  39. <para><filename>Copy_Lines_Containing.bsh</filename></para>
  40. <para>Copies all lines from the current buffer, containing a
  41. user-supplied string, to the clipboard.</para>
  42. </listitem>
  43. <listitem>
  44. <para><filename>Cut_Lines_Containing.bsh</filename></para>
  45. <para>Cuts all lines from the current buffer, containing a
  46. user-supplied string, to the clipboard.</para>
  47. </listitem>
  48. <listitem>
  49. <para><filename>Copy_Selection_or_Line.bsh</filename></para>
  50. <para>If no text is selected, the current line is copied to the
  51. clipboard, otherwise the selected text is copied to the
  52. clipboard. Some editors have this has the default copy behavior.
  53. To achieve the same effect in jEdit, bind this macro to
  54. <keycap>C+c</keycap> in the <guibutton>Shortcuts</guibutton>
  55. pane of the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global
  56. Options</guimenuitem> dialog box.</para>
  57. </listitem>
  58. <listitem>
  59. <para><filename>Cut_Selection_or_Line.bsh</filename></para>
  60. <para>If no text is selected, the current line is cut to the
  61. clipboard, otherwise the selected text is cut to the clipboard.
  62. Some editors have this has the default cut behavior. To achieve
  63. the same effect in jEdit, bind this macro to
  64. <keycap>C+x</keycap> in the <guibutton>Shortcuts</guibutton>
  65. pane of the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global
  66. Options</guimenuitem> dialog box.</para>
  67. </listitem>
  68. <listitem>
  69. <para><filename>Copy_Visible_Lines.bsh</filename></para>
  70. <para>Copies the visible lines from the current buffer to the
  71. Clipboard. Lines that are not visible becuase they are folded
  72. are not copied.</para>
  73. </listitem>
  74. <listitem>
  75. <para><filename>Paste_Indent.bsh</filename></para>
  76. <para>Pastes the content of the clipboard and indents it.</para>
  77. </listitem>
  78. </itemizedlist>
  79. </section>
  80. <section id="macros-editing">
  81. <title>Editing Macros</title>
  82. <para>These macros automate various text editing tasks.</para>
  83. <itemizedlist>
  84. <listitem>
  85. <para><filename>Duplicate_Lines_Above.bsh</filename></para>
  86. <para>Duplicates current/selected line(s) upward.</para>
  87. </listitem>
  88. <listitem>
  89. <para><filename>Duplicate_Lines_Below.bsh</filename></para>
  90. <para>Duplicates current/selected line(s) downward.</para>
  91. </listitem>
  92. <listitem>
  93. <para><filename>Emacs_Ctrl-K.bsh</filename></para>
  94. <para>Cuts and appends text, from the cursor to the end of the
  95. line, into the copy buffer.</para>
  96. </listitem>
  97. <listitem>
  98. <para><filename>Emacs_Next_Line.bsh</filename></para>
  99. <para>Moves the cursor to the next line, centering the current
  100. line in the middle of the text area if the cursor is at the
  101. bottom of the text area.</para>
  102. </listitem>
  103. <listitem>
  104. <para><filename>Emacs_Previous_Line.bsh</filename></para>
  105. <para>Moves the cursor to the previous line, centering the
  106. current line in the middle of the text area if the cursor is at
  107. the top of the text area.</para>
  108. </listitem>
  109. <listitem>
  110. <para><filename>Go_to_Column.bsh</filename></para>
  111. <para>Prompts the user for a column position on the current
  112. line, then moves the caret there.</para>
  113. </listitem>
  114. <listitem>
  115. <para><filename>Greedy_Backspace.bsh</filename></para>
  116. <para>If buffer is using soft tabs, this macro will backspace to
  117. the previous tab stop, if all characters between the caret and
  118. the tab stop are spaces. In all other cases a single character
  119. is removed.</para>
  120. </listitem>
  121. <listitem>
  122. <para><filename>Greedy_Delete.bsh</filename></para>
  123. <para>If a buffer is using soft tabs, this macro will delete
  124. tabSize number of spaces, if all the characters between the
  125. caret and the next tab stop are spaces. In all other cases a
  126. single character is deleted.</para>
  127. </listitem>
  128. <listitem>
  129. <para><filename>Greedy_Left.bsh</filename></para>
  130. <para>If a buffer is using soft tabs, this macro will move the
  131. caret tabSize spaces to the left, if all the characters between
  132. the caret and the previous tab stop are all spaces. In all other
  133. cases, the caret is moved a single character to the left.</para>
  134. </listitem>
  135. <listitem>
  136. <para><filename>Greedy_Right.bsh</filename></para>
  137. <para>If a buffer is using soft tabs, this macro will move the
  138. caret tabSize spaces to the right, if all the characters between
  139. the caret and the next tab stop are all spaces. In all other
  140. cases, the caret is moved a single character to the
  141. right.</para>
  142. </listitem>
  143. <listitem>
  144. <para><filename>Keywords_to_Upper_Case.bsh</filename></para>
  145. <para>Converts all keywords in the current buffer to upper
  146. case.</para>
  147. </listitem>
  148. <listitem>
  149. <para><filename>Mode_Switcher.bsh</filename></para>
  150. <para>Displays a modal dialog with the current buffer's mode in
  151. a text field, allowing one to change the mode by typing in its
  152. name.</para>
  153. <para><keycap>ENTER</keycap> selects the current mode; if the
  154. text is not a valid mode, the dialog still dismisses, but a
  155. warning is logged to the activity log. <keycap>ESACPE</keycap>
  156. closes the dialog with no further action. <keycap>TAB</keycap>
  157. attempts to auto-complete the mode name. Pressing
  158. <keycap>TAB</keycap> repeatedly cycles through the possible
  159. completions. <keycap>SHIFT-TAB</keycap> cycles through the
  160. completions in reverse.</para>
  161. </listitem>
  162. <listitem>
  163. <para><filename>Move_Line_Down.bsh</filename></para>
  164. <para>Moves the current line down one, with automatic
  165. indentation.</para>
  166. </listitem>
  167. <listitem>
  168. <para><filename>Move_Line_Up.bsh</filename></para>
  169. <para>Moves the current line up one, with automatic
  170. indentation.</para>
  171. </listitem>
  172. <listitem>
  173. <para><filename>Open_Line_Above.bsh</filename></para>
  174. <para>Adds a new blank line before the current/selected line(s).</para>
  175. </listitem>
  176. <listitem>
  177. <para><filename>Open_Line_Below.bsh</filename></para>
  178. <para>Adds a new blank line after the current/selected line(s).</para>
  179. </listitem>
  180. <listitem>
  181. <para><filename>Toggle_Fold.bsh</filename></para>
  182. <para>Toggles visibility of current fold.</para>
  183. <para>This is especially useful for fold toggling via keyboard.</para>
  184. </listitem>
  185. </itemizedlist>
  186. </section>
  187. <section id="macros-files">
  188. <title>File Management Macros</title>
  189. <para>These macros automate the opening and closing of files.</para>
  190. <itemizedlist>
  191. <listitem>
  192. <para><filename>Browse_Buffer_Directory.bsh</filename></para>
  193. <para>Opens a the current buffer's directory in the file system
  194. browser.</para>
  195. </listitem>
  196. <listitem>
  197. <para><filename>Browse_Directory.bsh</filename></para>
  198. <para>Opens a directory supplied by the user in the file system
  199. browser.</para>
  200. </listitem>
  201. <listitem>
  202. <para><filename>Buffer_Switcher.bsh</filename></para>
  203. <para>Displays a modal dialog listing all open buffers, allowing
  204. one to switch to and/or close buffers. <keycap>ENTER</keycap>
  205. switches to a buffer and closes the dialog,
  206. <keycap>DELETE</keycap> closes a buffer, <keycap>SPACE</keycap>
  207. switches to a buffer but does not close the dialog.</para>
  208. </listitem>
  209. <listitem>
  210. <para><filename>Close_All_Except_Active.bsh</filename></para>
  211. <para>Closes all files except the current buffer.</para>
  212. <para>Prompts the user to save any buffer containing unsaved
  213. changes.</para>
  214. </listitem>
  215. <listitem>
  216. <para><filename>Copy_Path_to_Clipboad.bsh</filename></para>
  217. <para>Copies the current buffer's path to the clipboard.</para>
  218. </listitem>
  219. <listitem>
  220. <para><filename>Copy_Name_to_Clipboad.bsh</filename></para>
  221. <para>Copies the current buffer's filename to the
  222. clipboard.</para>
  223. </listitem>
  224. <listitem>
  225. <para><filename>Duplicate_Buffer.bsh</filename></para>
  226. <para>Duplicates the current buffer into a new one.</para>
  227. </listitem>
  228. <listitem>
  229. <para><filename>Delete_Current.bsh</filename></para>
  230. <para>Deletes the current buffer's file on disk, but doesn't
  231. close the buffer.</para>
  232. </listitem>
  233. <listitem>
  234. <para><filename>Glob_Close.bsh</filename></para>
  235. <para>Closes all open buffers matching a given glob
  236. pattern.</para>
  237. </listitem>
  238. <listitem>
  239. <para><filename>Insert_Selection.bsh</filename></para>
  240. <para>Assumes the current selection is file path and tries
  241. replaces the selection with the contents of the file. Does
  242. nothing if no text is selected or the selection spans multiple
  243. lines.</para>
  244. </listitem>
  245. <listitem>
  246. <para><filename>Next_Dirty_Buffer.bsh</filename></para>
  247. <para>Switches to the next dirty buffer, if there is one.</para>
  248. </listitem>
  249. <listitem>
  250. <para><filename>Open_Path.bsh</filename></para>
  251. <para>Opens the file supplied by the user in an input
  252. dialog.</para>
  253. </listitem>
  254. <listitem>
  255. <para><filename>Open_Selection.bsh</filename></para>
  256. <para>Opens the file named by the current buffer's selected
  257. text.</para>
  258. </listitem>
  259. <listitem>
  260. <para><filename>Send_Buffer_To_Next_Split.bsh</filename></para>
  261. <para>If bufferset scope is set to EditPane, the current buffer
  262. is added to the next Editpane's bufferset.</para>
  263. </listitem>
  264. <listitem>
  265. <para><filename>Toggle_ReadOnly.bsh</filename></para>
  266. <para>Toggles a local file's read-only flag. Uses
  267. platform-specific commands, so it only works on Windows, Unix
  268. and MacOS X.</para>
  269. </listitem>
  270. </itemizedlist>
  271. </section>
  272. <section id="macros-interface">
  273. <title>User Interface Macros</title>
  274. <para>Description.</para>
  275. <itemizedlist>
  276. <listitem>
  277. <para><filename>Decrease_Font_Size.bsh</filename></para>
  278. <para>Decreases the font size in the gutter and text area by 1
  279. point.</para>
  280. </listitem>
  281. <listitem>
  282. <para><filename>Increase_Font_Size.bsh</filename></para>
  283. <para>Increases the font size in the gutter and text area by 1
  284. point.</para>
  285. </listitem>
  286. <listitem>
  287. <para><filename>Open_Context_Menu.bsh</filename></para>
  288. <para>Opens the text area context menu just below and to the
  289. right of the caret.</para>
  290. </listitem>
  291. <listitem>
  292. <para><filename>Reset_TextArea.bsh</filename> </para>
  293. <para>Performs a split and an unsplit of the current TextArea.
  294. Useful for those occasions when your textarea is corrupt
  295. (painting the incorrect characters on the screen).</para>
  296. </listitem>
  297. <listitem>
  298. <para><filename>Splitpane_Grow.bsh</filename> </para>
  299. <para>When inside a split EditPane, this macro moves the
  300. splitter away from the cursor, effectively increasing the size of
  301. the currently active split pane.</para>
  302. </listitem>
  303. <listitem>
  304. <para><filename>Toggle_Bottom_Docking_Area.bsh</filename></para>
  305. <para>Expands or collapses the bottom docking area, depending on
  306. it's current state.</para>
  307. </listitem>
  308. <listitem>
  309. <para><filename>Toggle_Left_Docking_Area.bsh</filename></para>
  310. <para>Expands or collapses the left docking area, depending on
  311. it's current state.</para>
  312. </listitem>
  313. <listitem>
  314. <para><filename>Toggle_Right_Docking_Area.bsh</filename></para>
  315. <para>Expands or collapses the right docking area, depending on
  316. it's current state.</para>
  317. </listitem>
  318. <listitem>
  319. <para><filename>Toggle_Top_Docking_Area.bsh</filename></para>
  320. <para>Expands or collapses the top docking area, depending on
  321. it's current state.</para>
  322. </listitem>
  323. </itemizedlist>
  324. </section>
  325. <section id="macros-java">
  326. <title>Java Code Macros</title>
  327. <para>These macros handle text formatting and generation tasks that are
  328. particularly useful in writing Java code.</para>
  329. <itemizedlist>
  330. <listitem>
  331. <para><filename>Create_Constructor.bsh</filename></para>
  332. <para>Inserts constructor for the class at the current caret
  333. position.</para>
  334. </listitem>
  335. <listitem>
  336. <para><filename>Get_Class_Name.bsh</filename></para>
  337. <para>Inserts a Java class name based upon the buffer's file
  338. name.</para>
  339. </listitem>
  340. <listitem>
  341. <para><filename>Get_Package_Name.bsh</filename></para>
  342. <para>Inserts a plausible Java package name for the current
  343. buffer.</para>
  344. <para>The macro compares the buffer's path name with the
  345. elements of the classpath being used by the jEdit session. An
  346. error message will be displayed if no suitable package name is
  347. found. This macro will not work if jEdit is being run as a JAR
  348. file without specifying a classpath; in that case the classpath
  349. seen by the macro consists solely of the JAR file.</para>
  350. </listitem>
  351. <listitem>
  352. <para><filename>Java_File_Save.bsh</filename></para>
  353. <abstract>
  354. <para>Acts as a wrapper script to the Save As action. If the
  355. buffer is a new file, it scans the first 250 lines for a
  356. Java class or interface declaration. On finding one, it
  357. extracts the appropriate filename to be used in the Save As
  358. dialog.</para>
  359. </abstract>
  360. </listitem>
  361. <listitem>
  362. <para><filename>Make_Get_and_Set_Methods.bsh</filename></para>
  363. <para>Creates <function>getXXX()</function> or
  364. <function>setXXX()</function> methods that can be pasted into
  365. the buffer text.</para>
  366. <para>This macro presents a dialog that will <quote>grab</quote>
  367. the names of instance variables from the caret line of the
  368. current buffer and paste a corresponding
  369. <function>getXXX()</function> or <function>setXXX()</function>
  370. method to one of two text areas in the dialog. The text can be
  371. edited in the dialog and then pasted into the current buffer
  372. using the <guilabel>Insert...</guilabel> buttons. If the caret
  373. is set to a line containing something other than an instance
  374. variable, the text grabbing routine is likely to generate
  375. nonsense.</para>
  376. <para>As explained in the notes accompanying the source code,
  377. the macro uses a global variable which can be set to configure
  378. the macro to work with either Java or C++ code. When set for use
  379. with C++ code, the macro will also write (in commented text)
  380. definitions of <function>getXXX()</function> or
  381. <function>setXXX()</function> suitable for inclusion in a header
  382. file.</para>
  383. </listitem>
  384. <listitem>
  385. <para><filename>Preview_Javadoc_of_Buffer.bsh</filename></para>
  386. <para>Create and display API documentation for the current
  387. buffer.</para>
  388. <para>The macro includes various configuration variables you can
  389. change; see the comment at the beginning of the macro source for
  390. details.</para>
  391. </listitem>
  392. </itemizedlist>
  393. </section>
  394. <section id="macros-misc">
  395. <title>Miscellaneous Macros</title>
  396. <para>While these macros do not fit easily into the other categories,
  397. they all provide interesting and useful functions.</para>
  398. <itemizedlist>
  399. <listitem>
  400. <para><filename>Buffer_to_HyperSearch_Results.bsh</filename></para>
  401. <para>Reads HyperSearch results from a buffer that was
  402. previously created by the HyperSearch_Results_to_Buffer macro and possibly
  403. filtered manually, and imports them into the HyperSearch Results dockable.</para>
  404. </listitem>
  405. <listitem>
  406. <para><filename>Debug_BufferSets.bsh</filename></para>
  407. <para>Display int and hex values for the character at the caret,
  408. in the status bar.</para>
  409. </listitem>
  410. <listitem>
  411. <para><filename>Display_Abbreviations.bsh</filename></para>
  412. <para>Displays the abbreviations registered for each of jEdit's
  413. editing modes.</para>
  414. <para>The macro provides a read-only view of the abbreviations
  415. contained in the <quote>Abbreviations</quote> option pane.
  416. Pressing a letter key will scroll the table to the first entry
  417. beginning with that letter. A further option is provided to
  418. write a selected mode's abbreviations or all abbreviations in a
  419. text buffer for printing as a reference. Notes in the source
  420. code listing point out some display options that are configured
  421. by modifying global variables.</para>
  422. </listitem>
  423. <listitem>
  424. <para><filename>Display_Actions.bsh</filename></para>
  425. <para>Displays a list of all the actions known to jEdit
  426. categorised by their action set.</para>
  427. <para>This macro can be a useful reference if you want to use
  428. the jEdit 4.2 action bar.</para>
  429. </listitem>
  430. <listitem>
  431. <para><filename>Display_Character_Code.bsh</filename></para>
  432. <para>Display int and hex values for the character at the caret,
  433. in the status bar.</para>
  434. </listitem>
  435. <listitem>
  436. <para><filename>Display_Shortcuts.bsh</filename></para>
  437. <para>Displays a sorted list of the keyboard shortcuts currently
  438. in effect.</para>
  439. <para>The macro provides a combined read-only view of command,
  440. macro and plugin shortcuts. Pressing a letter key will scroll
  441. the table to the first entry beginning with that letter. A
  442. further option is provided to write the shortcut assignments in
  443. a text buffer for printing as a reference. Notes in the source
  444. code listing point out some display options that are configured
  445. by modifying global variables.</para>
  446. </listitem>
  447. <listitem>
  448. <para><filename>Evaluate_Buffer_in_BeanShell.bsh</filename></para>
  449. <para>Evaluates contents of current buffer as a BeanShell
  450. script, and opens a new buffer to receive any text
  451. output.</para>
  452. <para>This is a quick way to test a macro script even before its
  453. text is saved to a file. Opening a new buffer for output is a
  454. precaution to prevent the macro from inadvertently erasing or
  455. overwriting itself. BeanShell scripts that operate on the
  456. contents of the current buffer will not work meaningfully when
  457. tested using this macro.</para>
  458. </listitem>
  459. <listitem>
  460. <para><filename>Hex_Convert.bsh</filename></para>
  461. <para>Converts byte characters to their hex equivalent, and vice
  462. versa.</para>
  463. </listitem>
  464. <listitem>
  465. <para><filename>HyperSearch_Results_to_Buffer.bsh</filename></para>
  466. <para>Writes HyperSeach results to a new buffer.</para>
  467. <para>This buffer can be re-imported to the HyperSearch Results dockable
  468. by the Buffer_to_HyperSearch_Results macro.</para>
  469. </listitem>
  470. <listitem>
  471. <para><filename>Make_Bug_Report.bsh</filename></para>
  472. <para>Creates a new buffer with installation and error
  473. information extracted from the activity log.</para>
  474. <para>The macro extracts initial messages written to the
  475. activity log describing the user's operating system, JDK, jEdit
  476. version and installed plugins. It then appends the last set of
  477. error messages written to the activity log. The new text buffer
  478. can be saved and attached to an email message or a bug report
  479. made on SourceForge.</para>
  480. </listitem>
  481. <listitem>
  482. <para><filename>Run_Script.bsh</filename></para>
  483. <para>Runs script using interpreter based upon buffer's editing
  484. mode (by default, determined using file extension). You must
  485. have the appropriate interpreter (such as Perl, Python, or
  486. Windows Script Host) installed on your system.</para>
  487. </listitem>
  488. <listitem>
  489. <para><filename>Show_Threads.bsh</filename></para>
  490. <para>Displays in a tree format all running Java threads of the
  491. current Java Virtual Machine.</para>
  492. </listitem>
  493. </itemizedlist>
  494. </section>
  495. <section id="macros-properties">
  496. <title>Property Macros</title>
  497. <para>These macros produce lists or tables containing properties used by
  498. the Java platform or jEdit itself.</para>
  499. <itemizedlist>
  500. <listitem>
  501. <para><filename>Create_Plugin_Announcement.bsh</filename></para>
  502. <para>Creates an announcement for the Plugin Central Submission Tracker
  503. based on the plugins *.props and description.html files.</para>
  504. </listitem>
  505. <listitem>
  506. <para><filename>Insert_Buffer_Properties.bsh</filename></para>
  507. <para>Inserts buffer-local properties into the current
  508. buffer.</para>
  509. <para>If the buffer's mode has a line comment defined, or
  510. comment start and end defined, the inserted properties will be
  511. commented out.</para>
  512. </listitem>
  513. <listitem>
  514. <para><filename>jEdit_Properties.bsh</filename></para>
  515. <para>Writes an unsorted list of jEdit properties in a new
  516. buffer.</para>
  517. </listitem>
  518. <listitem>
  519. <para><filename>Look_and_Feel_Properties.bsh</filename></para>
  520. <para>Writes an unsorted list of the names of Java Look and Feel
  521. properties in a new buffer.</para>
  522. </listitem>
  523. <listitem>
  524. <para><filename>System_Properties.bsh</filename></para>
  525. <para>Writes an unsorted list of all Java system properties in a
  526. new buffer.</para>
  527. </listitem>
  528. </itemizedlist>
  529. </section>
  530. <section id="macros-text">
  531. <title>Text Macros</title>
  532. <para>These macros generate various forms of formatted text.</para>
  533. <itemizedlist>
  534. <listitem>
  535. <para><filename>Add_Prefix_and_Suffix.bsh</filename></para>
  536. <para>Adds user-supplied <quote>prefix</quote> and
  537. <quote>suffix</quote> text to each line in a group of selected
  538. lines.</para>
  539. <para>Text is added after leading whitespace and before trailing
  540. whitespace. A dialog window receives input and
  541. <quote>remembers</quote> past entries.</para>
  542. </listitem>
  543. <listitem>
  544. <para><filename>Color_Picker.bsh</filename></para>
  545. <para>Displays a color picker and inserts the selected color in
  546. hexadecimal format, prefixed with a <quote>#</quote>.</para>
  547. </listitem>
  548. <listitem>
  549. <para><filename>Compose_Tag.bsh</filename></para>
  550. <para>The selection is taken as tag name and replaced with a full xml tag.</para>
  551. </listitem>
  552. <listitem>
  553. <para><filename>Duplicate_Line.bsh</filename></para>
  554. <para>Duplicates the line on which the caret lies immediately
  555. beneath it and moves the caret to the new line.</para>
  556. </listitem>
  557. <listitem>
  558. <para><filename>Insert_Date.bsh</filename></para>
  559. <para>Inserts the current date and time in the current
  560. buffer.</para>
  561. <para>The inserted text includes a representation of the time in
  562. the <quote>Internet Time</quote> format.</para>
  563. </listitem>
  564. <listitem>
  565. <para><filename>Insert_Tag.bsh</filename></para>
  566. <para>Inserts a balanced pair of HTML/SGML/XML markup tags as
  567. supplied in an input dialog. The tags will surround any selected
  568. text.</para>
  569. </listitem>
  570. <listitem>
  571. <para><filename>Line_Filter.bsh</filename></para>
  572. <para>Filters lines of the current buffer due to a provided regular expression.
  573. The resulting set of lines can be either removed from the buffer or written to a new buffer.</para>
  574. <para>The filter works on a multiline selection (if there is one) otherwise on the whole buffer.
  575. The resulting set of lines includes those lines that either match or not match the regular expression.
  576. </para>
  577. </listitem>
  578. <listitem>
  579. <para><filename>Next_Char.bsh</filename></para>
  580. <para>Finds next occurrence of character on current line.</para>
  581. <para>The macro takes the next character typed after macro
  582. execution as the character being searched. That character is not
  583. displayed. If the character does not appear in the balance of
  584. the current line, no action occurs.</para>
  585. <para>This macro illustrates the use of
  586. <function>InputHandler.readNextChar()</function> as a means of
  587. obtaining user input. See <xref
  588. linkend="macro-tips-single-char" />.</para>
  589. </listitem>
  590. <listitem>
  591. <para><filename>Reverse_Lines.bsh</filename></para>
  592. <para>Reverses the selected lines or the entire buffer if no
  593. lines are selected. Does not support Rectangular
  594. Selections.</para>
  595. </listitem>
  596. <listitem>
  597. <para><filename>Single_Space_Buffer.bsh</filename></para>
  598. <para>Removes every second line, if they are all blank.</para>
  599. </listitem>
  600. </itemizedlist>
  601. </section>
  602. </appendix>