PageRenderTime 42ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/jEdit/tags/jedit-4-5-pre1/doc/tips/tip55.html

#
HTML | 17 lines | 12 code | 5 blank | 0 comment | 0 complexity | 13d641c831516edc8cf627e4193dc2e3 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><body>
  2. The <b>Utilities</b>&gt;<b>BeanShell</b>&gt;<b>Evaluate For Selected Lines</b> command
  3. evaluates the specified BeanShell expression for each selected line,
  4. replacing the contents of that line with the return value of the
  5. expression.<p>
  6. For example, you can use this to add a line number to each selected
  7. line, by evaluating the following expression:<p>
  8. <code>(index+1) + " " + text</code><p>
  9. Or you can add a prefix and suffix to each selected line, with this
  10. expression:<p>
  11. <code>"&lt;listitem&gt;" + text + "&lt;/listitem&gt;"</code>
  12. </body></html>