PageRenderTime 49ms CodeModel.GetById 47ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/jEdit/tags/jedit-4-0-pre5/doc/tips/tip55.html

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