1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
4
<title>Lua plugin for Geany - Reference</title>
5
<style type="text/css">
8
margin: 12px 25% 12px 5%
11
background-color:#f4f4fc
14
background-color:#ffffff
17
font-family:sans-serif
23
<hr><h2>Lua scripting plugin for the Geany IDE</h2><hr><br>
24
The Geany module provides these functions and variables...<br><br><br>
25
<div style="background-color:#fcf4f4; margin-left:12px; margin-right:12px">
27
<table summary="quick links" width="90%" align="center" >
29
<td><a href="#Editor_functions">Editor functions</a></td>
30
<td><a href="#System_functions">System functions</a></td>
31
<td><a href="#Dialog_functions">Dialog functions</a></td>
37
<b><a name="Editor_functions"></a>Editor functions:</b>
39
<table style="font-family:monospace" summary="function index" width="90%">
41
<td> function <a href="#activate"><b>activate</b></a> ( tab_id )<br></td>
42
<td class="desc">-- Focus the specified editor tab.</td>
45
<td> function <a href="#appinfo"><b>appinfo</b></a> ()<br></td>
46
<td class="desc">-- Return information about the current Geany instance.</td>
49
<td> function <a href="#batch"><b>batch</b></a> ( start )<br></td>
50
<td class="desc">-- Set a marker for a reversible group of operations.</td>
54
<td> function <a href="#byte"><b>byte</b></a> ( [position] )<br></td>
55
<td class="desc">-- Get the numeric value of the character at position.</td>
58
<td> function <a href="#caret"><b>caret</b></a> ( [position] )<br></td>
59
<td class="desc">-- Get or set the caret position.</td>
63
<td> function <a href="#close"><b>close</b></a> ( [filename]|[index] )<br></td>
64
<td class="desc">-- Close a document.</td>
68
<td> function <a href="#copy"><b>copy</b></a> ( [content]|[start,stop] )<br></td>
69
<td class="desc">-- Copy text to the clipboard.</td>
73
<td> function <a href="#count"><b>count</b></a> ()<br></td>
74
<td class="desc">-- Get the number of open tabs.</td>
78
<td> function <a href="#cut"><b>cut</b></a> ()<br></td>
79
<td class="desc">-- Cut selection to the clipboard.</td>
83
<td> function <a href="#documents"><b>documents</b></a> ( [doc_id] )<br></td>
84
<td class="desc">-- Access the list of all open documents.</td>
88
<td> function <a href="#filename"><b>filename</b></a> ()<br></td>
89
<td class="desc">-- Get the name of the current document.</td>
93
<td> function <a href="#fileinfo"><b>fileinfo</b></a> ()<br></td>
94
<td class="desc">-- Return some information about the current document.</td>
98
<td> function <a href="#find"><b>find</b></a> ( phrase, start, stop, options )<br></td>
99
<td class="desc">-- Search for text within the document.</td>
103
<td> function <a href="#height"><b>height</b></a> ()<br></td>
104
<td class="desc">-- Get the number of lines in the current document</td>
108
<td> function <a href="#keycmd"><b>keycmd</b></a> ( command )<br></td>
109
<td class="desc">-- Activate a built-in Geany menu command.</td>
113
<td> function <a href="#keygrab"><b>keygrab</b></a> ( [prompt] )<br></td>
114
<td class="desc">-- Intercept a keystroke from Geany.</td>
119
<td> function <a href="#length"><b>length</b></a> ()<br></td>
120
<td class="desc">-- Get number of characters in the current document.</td>
124
<td> function <a href="#lines"><b>lines</b></a> ( [index] )<br></td>
125
<td class="desc">-- Get the text on one specific line, or all of them.</td>
129
<td> function <a href="#match"><b>match</b></a> ( [position] )<br></td>
130
<td class="desc">-- Find a matching bracket, parenthesis, etc.</td>
134
<td> function <a href="#navigate"><b>navigate</b></a> ( mode,count [,extend [,rect]])<br></td>
135
<td class="desc">-- Move the caret incrementally.</td>
139
<td> function <a href="#newfile"><b>newfile</b></a> ( [filename] )<br></td>
140
<td class="desc">-- Create a new document.</td>
144
<td> function <a href="#open"><b>open</b></a> ( [filename]|[index] )<br></td>
145
<td class="desc">-- Open or reload a file from disk.</td>
149
<td> function <a href="#paste"><b>paste</b></a> ()<br></td>
150
<td class="desc">-- Paste text from the clipboard.</td>
155
<td> function <a href="#rowcol"><b>rowcol</b></a> ( [pos]|[row,col] )<br></td>
156
<td class="desc">-- Translate between linear and rectangular locations.</td>
160
<td> function <a href="#save"><b>save</b></a> ( [filename]|[index] )<br></td>
161
<td class="desc">-- Save an open document to a disk file.</td>
165
<td> function <a href="#scintilla"><b>scintilla</b></a> ( msg_id, wparam, lparam )<br></td>
166
<td class="desc">-- Send a message directly to the Scintilla widget.</td>
170
<td> function <a href="#select"><b>select</b></a> ( [[start,] stop] )<br></td>
171
<td class="desc">-- Get or set the selection endpoints and caret.</td>
175
<td> function <a href="#selection"><b>selection</b></a> ( [content] )<br></td>
176
<td class="desc">-- Get or set the contents of the document's selection.</td>
180
<td> function <a href="#signal"><b>signal</b></a> ( widget, signal )<br></td>
181
<td class="desc">-- Send a GTK signal to a Geany interface widget.</td>
185
<td> function <a href="#text"><b>text</b></a> ( [content] )<br></td>
186
<td class="desc">-- Get or set the contents of the entire document.</td>
190
<td> function <a href="#word"><b>word</b></a> ( [position] )<br></td>
191
<td class="desc">-- Get the word at the specified location.</td>
195
<td> function <a href="#xsel"><b>xsel</b></a> ( [text] )<br></td>
196
<td class="desc">-- Get or set the contents of the primary X selection.</td>
200
<td> function <a href="#yield"><b>yield</b></a> ()<br></td>
201
<td class="desc">-- Refreshes the user interface.</td>
211
<td> var <a href="#caller"><b>caller</b></a> : <i>number</i><br>
212
</td><td class="desc">-- The index of the document that triggered an event.</td>
216
<td> var <a href="#rectsel"><b>rectsel</b></a> : <i>boolean</i><br>
217
</td><td class="desc">-- Whether or not the selection is in rectangular mode.</td>
220
<td> var <a href="#project"><b>project</b></a> : <i>keyfile</i><br>
221
</td><td class="desc">-- An object representing a project configuration event.</td>
224
<td> var <a href="#script"><b>script</b></a> : <i>string</i><br>
225
</td><td class="desc">-- The filename of the currently executing Lua script.</td>
228
<td> var <a href="#wordchars"><b>wordchars</b></a> : <i>string</i><br></td>
229
<td class="desc">-- The characters that are considered part of a word.</td>
238
<b><a name="System_functions"></a>System functions:</b>
239
<table style="font-family:monospace" summary="function index" width="90%">
241
<td> function <a href="#basename"><b>basename</b></a>( pathstr )<br></td>
242
<td class="desc">-- Extract the filename portion of a path string.</td>
245
<td> function <a href="#dirlist"><b>dirlist</b></a>( path )<br></td>
246
<td class="desc">-- List the contents of a folder.</td>
249
<td> function <a href="#dirname"><b>dirname</b></a>( pathstr )<br></td>
250
<td class="desc">-- Get the directory portion of a file's path.</td>
253
<td> function <a href="#fullpath"><b>fullpath</b></a>( filename )<br></td>
254
<td class="desc">-- Get the full path to a file.</td>
257
<td> function <a href="#launch"><b>launch</b></a> ( program [, arg1 [, arg2, ...]] )<br></td>
258
<td class="desc">-- Execute an external application.</td>
261
<td> function <a href="#optimize"><b>optimize</b></a> ()<br></td>
262
<td class="desc">-- Run a script without the debug hook.</td>
265
<td> function <a href="#rescan"><b>rescan</b></a> ()<br></td>
266
<td class="desc">-- Regenerate the scripts menu.</td>
269
<td> function <a href="#stat"><b>stat</b></a> ( filename [, lstat] )<br></td>
270
<td class="desc">-- Retrieve some information about a disk file.</td>
273
<td> function <a href="#timeout"><b>timeout</b></a> ( seconds )<br></td>
274
<td class="desc">-- Control maximum time allowed for script execution.</td>
277
<td> function <a href="#wkdir"><b>wkdir</b></a> ( [folder] )<br></td>
278
<td class="desc">-- Get or set the current working directory.</td>
285
<td> var <a href="#dirsep"><b>dirsep</b></a> : <i>string</i><br>
286
</td><td class="desc">-- The default filesystem path separator, "<tt>/</tt>" or "<tt>\</tt>".</td>
293
<b><a name="Dialog_functions"></a>Dialog functions:</b>
294
<table style="font-family:monospace" summary="function index" width="90%">
296
<td> function <a href="#choose"><b>choose</b></a> ( prompt, items )</td>
297
<td class="desc" width="33%">-- Select an item from the list.</td>
300
<td> function <a href="#confirm"><b>confirm</b></a> ( title, question, default )</td>
301
<td class="desc">-- Ask a yes-or-no question.</td>
304
<td> function <a href="#input"><b>input</b></a> ( [prompt] [,default] )</td>
305
<td class="desc">-- Prompt to enter some text.</td>
308
<td> function <a href="#message"><b>message</b></a> ( [title,] message )</td>
309
<td class="desc">-- Display some information.</td>
312
<td> function <a href="#pickfile"><b>pickfile</b></a> ( [mode [,path [,filter]]] )</td>
313
<td class="desc">-- Select a file from disk.</td>
320
<td> var <a href="#banner"><b>banner</b></a> : <i>string</i><br></td>
321
<td class="desc">-- The window title for all dialogs.</td>
324
If you need a more advanced dialog creation API, check out the
325
<tt><big><a href="geanylua-input.html">dialog</a></big></tt> module.
330
<hr><a name="activate"></a><h3><tt>geany.activate ( tab_id )</tt></h3><p>
331
Activates the document specified by <tt><b>tab_id</b></tt>.
334
If <tt><b>tab_id</b></tt> is a number, it activates the document at that index.
335
A <i>positive</i> number refers to the internal document array, and a <i>negative</i>
336
number refers to the (absolute) GtkNotebook index.<br>
337
Note that the indices begin at <tt>(1)</tt> and <tt>(-1)</tt> respectively.
340
If <tt><b>tab_id</b></tt> is a string, the function will try to activate the
341
notebook tab whose filename matches that string.<br>
342
( The full pathname is required! )
344
Returns <tt><b>true</b></tt> on success, or <tt><b>false</b></tt> if the tab could not be found.
347
<a name="appinfo"></a><hr><h3><tt>geany.appinfo ()</tt></h3><p>
348
Returns a Lua table containing information about the currently running Geany instance.<br><br>
349
The <tt>appinfo</tt> table contains the following fields:
351
<table border="0" summary="appinfo table fields">
352
<tr><td width="5%"></td><td><tt>debug</tt></td><td> -- <tt>true</tt> if Geany is running in debug mode.</td></tr>
353
<tr><td width="5%"></td><td><tt>configdir </tt></td><td> -- User's local configuration folder.</td></tr>
354
<tr><td width="5%"></td><td><tt>datadir</tt></td><td> -- System-wide configuration folder.</td></tr>
355
<tr><td width="5%"></td><td><tt>docdir</tt></td><td> -- Location of the Geany help files.</td></tr>
356
<tr><td width="5%"></td><td><tt>scriptdir</tt></td><td> -- Top level folder for GeanyLua scripts.</td></tr>
357
<tr><td width="5%"></td><td><tt>tools</tt></td><td> -- Table of user-configured tools. (see below)</td></tr>
358
<tr><td width="5%"></td><td><tt>template</tt></td><td> -- Table of user's template information. (see below)</td></tr>
359
<tr><td width="5%"></td><td><tt>project</tt></td><td> -- Table of current project information. (see below)</td></tr>
362
————</p><p>
363
The <tt>tools</tt> sub-table contains the following fields:
365
<table border="0" summary="tools table fields">
366
<tr><td width="15%"></td><td><tt>browser</tt> </td></tr>
367
<tr><td width="15%"></td><td><tt>make</tt> </td></tr>
368
<tr><td width="15%"></td><td><tt>term</tt> </td><td></tr>
369
<tr><td width="15%"></td><td><tt>print</tt> </td></tr>
370
<tr><td width="15%"></td><td><tt>grep</tt> </td></tr>
371
<tr><td width="15%"></td><td><tt>action</tt> </td></tr>
374
————</p><p>
375
The <tt>template</tt> sub-table contains the following fields:
377
<table border="0" summary="template fields">
378
<tr><td width="15%"></td><td><tt>developer</tt> </td></tr>
379
<tr><td width="15%"></td><td><tt>company</tt> </td></tr>
380
<tr><td width="15%"></td><td><tt>mail</tt> </td><td></tr>
381
<tr><td width="15%"></td><td><tt>initial</tt> </td></tr>
382
<tr><td width="15%"></td><td><tt>version</tt> </td></tr>
385
————</p><p>
386
The <tt>project</tt> sub-table *might* contain the following fields:
388
<table border="0" summary="template fields">
389
<tr><td width="15%"></td><td><tt>name</tt> </td><td> -- Name of project.</td></tr>
390
<tr><td width="15%"></td><td><tt>desc</tt> </td><td> -- Project description.</td></tr>
391
<tr><td width="15%"></td><td><tt>file</tt> </td><td> -- Project filename.</td></tr>
392
<tr><td width="15%"></td><td><tt>base</tt> </td><td> -- Base path of project files.</td></tr>
393
<tr><td width="15%"></td><td><tt>exec</tt> </td><td> -- Default "run" command.</td></tr>
394
<tr><td width="15%"></td><td><tt>mask</tt> </td><td> -- Semicolon-delimited list of filetypes.</td></tr>
397
<b>* Important:</b> The entire <tt>project</tt> sub-table will be <tt>nil</tt> if there is no open project!<br>
400
<a name="basename"></a><hr><h3><tt>geany.basename ( pathstr )</tt></h3><p>
401
Returns the rightmost filename portion of <tt>pathstr</tt>, with the directory portion removed.
404
<hr><a name="batch"></a><h3><tt>geany.batch ( start )</tt></h3><p>
405
This function marks the beginning or ending of a group of operations<br>
406
that you want the user to be able to undo in a single step.</p>
408
If the <tt><b>start</b></tt> argument is <tt><b>true</b></tt>,
409
it marks the <i>beginning</i> of a group of operations.</p>
411
If the <tt><b>start</b></tt> argument is <tt><b>false</b></tt>,
412
it marks the <i>ending</i> of a group of operations.
415
<hr><a name="byte"></a><h3><tt>geany.byte ( [position] )</tt></h3><p>
416
When called with no arguments, returns the numeric value of the character at
417
the current caret position.</p><p>
418
When called with a numeric <tt><b>position</b></tt> argument, returns the
419
value of the character at that position.
423
<hr><a name="caret"></a><h3><tt>geany.caret ( [position] )</tt></h3><p>
424
When called with no arguments, returns the current caret position.</p>
426
When called with a single numeric argument, moves the caret to that position.<br>
427
Out-of-range values are adjusted to the nearest possible position (i.e. the start or end of the document.)
430
<a name="close"></a><hr><h3><tt>geany.close ( [filename]|[index] )</tt></h3>
432
When called with no arguments, closes the currently active document.
435
When called with a numeric argument, closes the file of that document index.
438
When called with a string argument, it will close that named document.
441
If the document has unsaved changes, the user will be prompted to save before closing,<br>
442
and will also be given the option to cancel the operation. To avoid this, you might <br>
443
want to consider using the <tt>geany.save()</tt> function beforehand.
446
Returns <tt><b>true</b></tt> if the document was successfully closed, or <tt><b>false</b></tt> otherwise.</p>
449
<hr><a name="copy"></a><h3><tt>geany.copy ( [content]|[start,stop] )</tt></h3><p>
450
When called with no arguments, copies the current selection to the clipboard.
452
When called with a single string argument, copies the contents of that string to the clipboard.
455
When called with two arguments, copies the portion of the current document's text
456
that lies between the <tt><b>start</b></tt> and <tt><b>stop</b></tt> positions.
457
(Both positions must be positive numbers.)
460
Returns the number of characters copied, or <tt><b>nil</b></tt> if there is no open document.
464
<hr><a name="count"></a><h3><tt>geany.count ()</tt></h3><p>
465
Returns the number of open documents.
469
<hr><a name="cut"></a><h3><tt>geany.cut ()</tt></h3><p>
470
Cuts the current selection to the clipboard.
473
Returns the number of characters cut, or <tt><b>nil</b></tt> if there is no open document.
477
<a name="dirlist"></a><hr><h3><tt>geany.dirlist ( path )</tt></h3><p>
478
Returns an iterator function that will be called once for each entry (file or subdirectory) in the specified folder.
479
The iterator produces only the name of each entry, and in no particular order.</p><p>
480
This function will generate an error dialog if the specified folder does not exist or cannot be accessed.
483
<a name="dirname"></a><hr><h3><tt>geany.dirname ( pathstr )</tt></h3><p>
484
Returns the directory portion of <tt>pathstr</tt>, with the rightmost filename portion removed.
487
<hr><a name="documents"></a><h3><tt>geany.documents ( [doc_id] )</tt></h3><p>
488
When called with a numeric argument, returns the full path and filename of <br>
489
the document at the index specified by <tt><b>doc_id</b></tt>.
492
When called with a string argument, returns the numeric index of the document with the<br>
493
path/filename that matches the <tt><b>doc_id</b></tt> string.<br>
496
Either of the two forms above may also return <tt><b>nil</b></tt> if the argument cannot be matched.</p>
498
Note: The <i>index</i> here refers to the editor's internal document array,
499
and might not be <br>
500
the same as the notebook tab index, since the tabs can be re-ordered by the user.
504
When called with no arguments, the function returns an iterator to list the full path and filename
505
of each document currently open in the editor.</p><p>
509
for filename in geany.documents()
518
<a name="filename"></a><hr><h3><tt>geany.filename ()</tt></h3><p>
519
Returns the full path and filename of the current Geany document.</p><p>
520
If there is no open document, or if the current document is untitled, returns <tt><b>nil</b></tt>.
524
<a name="fileinfo"></a><hr><h3><tt>geany.fileinfo ()</tt></h3><p>
525
Returns a Lua table containing various information about the current document.<br>
526
If there is no open document, returns <tt><b>nil</b></tt>.
528
The returned table contains the following fields:
529
<table border="0" summary="fileinfo fields">
530
<tr><td width="5%"></td><td><tt>name</tt> </td><td> -- The filename, without the path.</td></tr>
531
<tr><td width="5%"></td><td><tt>path</tt> </td><td> -- The full path of the file's directory, including the trailing slash.</td></tr>
532
<tr><td width="5%"></td><td><tt>ext</tt> </td><td> -- The file extension, including the dot, e.g. "<b>.DLL</b>" or "<b>.txt</b>"</td></tr>
533
<tr><td width="5%"></td><td><tt>type</tt> </td><td> -- A one-word description of the filetype, e.g. "<b>C</b>" or "<b>Python</b>".</td></tr>
534
<tr><td width="5%"></td><td><tt>desc</tt> </td><td> -- A longer description of the filetype, e.g. "<b>Lua source file</b>" or "<b>Cascading StyleSheet</b>".</td></tr>
535
<tr><td width="5%"></td><td><tt>opener</tt> </td><td> -- The string used to begin a comment, e.g. "<b class="desc"><!--</b>".</td></tr>
536
<tr><td width="5%"></td><td><tt>closer</tt> </td><td> -- The string used to end a comment, e.g. "<b class="desc">--></b>".</td></tr>
537
<tr><td width="5%"></td><td><tt>action</tt> </td><td> -- The action command as executed by the context menu</td></tr>
538
<tr><td width="5%"></td><td><tt>compiler</tt> </td><td> -- The command used to compile this type of file.</td></tr>
539
<tr><td width="5%"></td><td><tt>linker</tt> </td><td> -- The command used to link this type of file.</td></tr>
540
<tr><td width="5%"></td><td><tt>exec</tt> </td><td> -- The primary command used to execute this type of file.</td></tr>
541
<tr><td width="5%"></td><td><tt>exec2</tt> </td><td> -- An alternative command used to execute this type of file.</td></tr>
542
<tr><td width="5%"></td><td><tt>ftid</tt> </td><td> -- The unique numeric filetype identifier, as used by Geany.</td></tr>
543
<tr><td width="5%"></td><td><tt>encoding</tt> </td><td> -- The file's in-memory encoding. (may differ from the on-disk encoding.)</td></tr>
544
<tr><td width="5%"></td><td><tt>bom</tt> </td><td> -- <tt><b>true</b></tt> if the file contains a <b>B</b>yte-<b>O</b>rder <b>M</b>arker.</td></tr>
545
<tr><td width="5%"></td><td><tt>changed</tt> </td><td> -- <tt><b>true</b></tt> if the file has unsaved changes.</td></tr>
546
<tr><td width="5%"></td><td><tt>readonly</tt> </td><td> -- <tt><b>true</b></tt> if the in-memory document is tagged as read-only.</td></tr>
552
<a name="find"></a><hr><h3><tt>geany.find ( phrase, start, stop, options )</tt></h3><p>
553
Searches within the current document for the string <tt>phrase</tt>, beginning at <br>
554
the numeric <tt>start</tt> position and ending at the <tt>stop</tt> position.<br>
555
( To search backwards, specify a <tt>start</tt> value greater than <tt>stop</tt> . )<br><br>
559
The <tt>options</tt> argument is a table, each element may be one of the following strings:<br>
561
<table border="0" summary="search options">
562
<tr><td width="3%"> </td><td width="20%"><tt>
563
"matchcase"</tt></td><td> -- A match only occurs with text that matches the case of the search string.
565
<tr><td> </td><td><tt>
566
"wholeword" </tt> </td><td> -- A match only occurs if the characters before and after are not word characters.
568
<tr><td> </td><td><tt>
569
"wordstart" </tt> </td><td> -- A match only occurs if the character before is not a word character.
571
<tr><td> </td><td><tt>
572
"regexp" </tt> </td><td> -- The search string should be interpreted as a regular expression.
574
<tr><td> </td><td><tt>
575
"posix" </tt> </td><td> -- Use bare parentheses
578
for tagged sections rather than the escaped <tt><b>\(</b></tt> and <tt><b>\)</b></tt>.
581
( The empty set <tt><b>{}</b></tt> may also be specified, to search using the default options. )
585
If a match is found, the function returns the starting and ending positions of the match,<br>
586
otherwise it returns <tt><b>nil</b>.</tt>
588
For example, to select the first case-sensitive whole-word match of the string
589
'<b>foobar</b>' you could use something like this:</p>
591
a,b = geany.find( "foobar", 0, geany.length(), {"wholeword","matchcase"} )
595
geany.message("Search phrase not found.")
601
<a name="fullpath"></a><hr><h3><tt>geany.fullpath ( filename )</tt></h3><p>
602
Returns the fully canonicalized form of the path to an <i>existing</i> named file, or <tt>nil</tt> if the path could not be found.
608
<a name="height"></a><hr><h3><tt>geany.height ()</tt></h3><p>
609
Returns the total number of lines in the current document.
612
<a name="keycmd"></a><hr><h3><tt>geany.keycmd ( command )</tt></h3><p>
613
Activates (runs) one of Geany's built-in menu commands.</p><p>
614
The <tt>command</tt> argument should be one the string constants defined in the
615
"<tt>glspi_keycmd.h</tt>" header from the plugin sources.
616
For example, to display Geany's preferences dialog, you could use:</p><p>
617
<tt> geany.keycmd("MENU_PREFERENCES")</tt>
620
This function raises an error if the command argument is invalid.
627
<a name="keygrab"></a><hr><h3><tt>geany.keygrab ( [prompt] )</tt></h3><p>
629
Intercepts the next keyboard key pressed, preventing the editor from receiving
630
that keyboard event.</p>
632
The function returns the value of the pressed key as a string,
633
alphanumeric keys will return their keyboard value, such as
634
<tt>"a"</tt> or <tt>"1"</tt> while other keys may
635
return a string describing the key, such
636
as <tt>"Return"</tt> or <tt>"Escape"</tt>.
637
( Consult the file <tt>gdk/gdkkeysyms.h</tt> in the GTK sources for some idea of the key names. )
639
It should be possible to use this function on keyboards other than US,
640
although this hasn't been tested, and scripts written for one keyboard
641
might not be portable to another system. </p>
642
<p>Key combinations with the modifier keys <b>[Ctrl]</b> or <b>[Alt]</b>
643
are not supported. Detection of the <b>[Shift]</b> key state is somewhat supported,
644
although currently it may not be completely reliable.
645
Repeatedly calling this function in rapid succession (as in a loop) may also result in some "dropped" keys,
646
so for best results its use should be confined to detecting a single "lowercase" key press.</p><p>
648
If the optional <tt>prompt</tt> string argument is present, its text will be shown
649
as a "calltip" near the upper left-hand area of the current document.
650
(but only if there is a document open.)</p>
652
This function was primarily intended for assigning "chained" sets of hot key
653
options, in conjunction with user-defined <a href="geanylua-keys.html">keybindings</a>.
665
<a name="launch"></a><hr><h3><tt>geany.launch ( program [, arg1 [, arg2, ...]] )</tt></h3><p>
666
Executes the external application specified by <tt>program</tt>,
667
passing any additional arguments to its command line.
670
Returns <tt>true</tt> if the process was succesfully created, else it returns <tt>false</tt> plus an error message.</p>
673
local ok,msg = geany.launch("firefox", "http://www.yahoo.com/")<br>
674
if not ok then geany.message(msg) end</tt>
677
This function returns immediately, regardless of the status of the newly-created process.
678
If you need to wait for a process to complete before returning,
679
use Lua's built-in <tt>os.execute()</tt> function instead.
681
<p>Note that using this function on MS-Windows might require installing the
682
"<b><tt>gspawn-win32-helper.exe</tt></b>" program somewhere in your <tt>PATH</tt>.
683
( It is included in the GTK/GLib package. )</p>
687
<a name="length"></a><hr><h3><tt>geany.length ()</tt></h3><p>
688
Returns the text length of the current document.
692
<a name="lines"></a><hr><h3><tt>geany.lines ( [index] )</tt></h3><p>
693
When called with one argument, returns a string containing the text at
694
the specified line number of the current document.<br>
695
It may also return <tt><b>nil</b></tt> if there is no open document,
696
or if the specified <tt><b>index</b></tt> is outside the range of lines.
698
When called without any arguments, it returns an iterator that steps
699
through each line of the current document. <br>
700
So you can use it like this:<pre>
701
for line in geany.lines()
709
<a name="match"></a><hr><h3><tt>geany.match ( [position] )</tt></h3><p>
710
Attempts to find a corresponding matching brace from the given <tt><b>position</b></tt> of one brace.<br>
711
( If the <tt><b>position</b></tt> argument is omitted, the current caret position is assumed. )
713
<p>The brace characters handled are: <tt><b> () [] {} <></b></tt></p>
714
<p> The search is forwards from an opening brace and backwards from a closing brace.<br>
715
If the character at <tt><b>position</b></tt> is not a brace character, or a matching brace cannot be found,<br>
716
the return value is -1. Otherwise, the return value is the position of the matching brace.
721
<a name="navigate"></a><hr><h3><tt>geany.navigate ( mode, count [,extend [,rect]] )</tt></h3><p>
722
Moves the caret incrementally.</p>
724
The <tt><b>mode</b></tt> argument must be one of the following strings:
726
<li><tt>"char"</tt> -- Move by characters.</li>
727
<li><tt>"part"</tt> -- Move by segments in <big>MixedCase</big> or <big>under_score</big> style identifiers.</li>
728
<li><tt>"word"</tt> -- Move by words.</li>
729
<li><tt>"edge"</tt> -- Move to beginning or end of current line.</li>
730
<li><tt>"line"</tt> -- Move up or down by lines.</li>
731
<li><tt>"para"</tt> -- Move up or down by paragraphs.</li>
732
<li><tt>"page"</tt> -- Move up or down by pages.</li>
733
<li><tt>"body"</tt> -- Move to the beginning or end of the entire document.</li>
736
If the numeric <tt><b>count</b></tt> argument is <i>positive</i>, the caret is moved <i>forward</i> or <i>down</i> by that many steps.<br>
737
If it is <i>negative</i>, the caret is moved <i>backward</i> or <i>up</i> by that many steps.<br>
738
( If it is <i>zero</i> there is not much point in using this function. )<br>
739
There is also no point in using a magnitude greater than <i>one</i> for the <tt>"edge"</tt> or <tt>"body"</tt> modes.
742
If the optional boolean <tt><b>extend</b></tt> argument is <tt><b>true</b></tt>,
743
the selection is expanded or contracted to the new caret position,
744
similar to holding down the <big>[Shift]</big> key when navigating with the keyboard.
746
If the optional boolean <tt><b>rect</b></tt> argument is also <tt><b>true</b></tt>,
747
the selection is treated as <i>rectangular</i> rather than <i>linear</i>.<br>
748
( Rectangular selection is only supported for <tt>char</tt>, <tt>edge</tt>,
749
<tt>line</tt>, or <tt>page</tt> modes. )
754
<a name="newfile"></a><hr><h3><tt>geany.newfile ( [filename] )</tt></h3><p>
755
When called with one argument, creates a new document with the specified
756
<tt>filename</tt>. </p><p>When called with no arguments, creates a new, untitled document.
761
<a name="open"></a><hr><h3><tt>geany.open ( [filename]|[index] )</tt></h3><p>
762
When called with no arguments, reloads the currently active document from disk.
764
When called with a numeric argument, reloads the file of that document index.
766
When called with a string argument, it will reload that filename if it is already open,
767
or otherwise it will open it in a new tab. <br>
768
It will not create a non-existent file, for that you need to use <tt>geany.newfile()</tt>
771
Returns the <i>one-based</i> document index on success,
772
or <i>zero</i> if the document could not be opened or reloaded.</p>
775
<a name="optimize"></a><hr><h3><tt>geany.optimize ()</tt></h3><p>
776
Disables the Lua interpreter's "debug hook", the thing that
777
allows the plugin to track line number information and elapsed time.</p><p>
778
The advantage of calling <tt>optimize()</tt> is that a lengthy, CPU-intensive
779
script can sometimes run much faster.
781
The disadvantage is that you lose the line number information that helps in
782
debugging your script, and the built-in protection against things like endless loops.
783
For this reason you should only use this function if you really need it, and
784
only when you are reasonably sure that your script doesn't contain any errors.
785
</p><p>For best results this function should be called at the very
786
beginning of the script.
791
<a name="paste"></a><hr><h3><tt>geany.paste ()</tt></h3><p>
792
Pastes the text from the clipboard into the active document at the current caret position,<br>
793
replacing any current selection.
795
Returns <tt><b>nil</b></tt> if there is no open document,
796
or if the document is marked read-only.</p><p>
797
Otherwise it returns the effective change in the document's size. <br>
798
( Which may actually be negative, if the clipboard content size is less than the prior selection. )
803
<a name="rescan"></a><hr><h3><tt>geany.rescan ()</tt></h3><p>
804
Scans the scripts folder, rebuilds the <b><i>Tools-><u>L</u>ua Scripts</i></b> menu,
805
and re-initializes the GTK accelerator group (keybindings) associated with the plugin.
809
<a name="rowcol"></a><hr><h3><tt>geany.rowcol ( [position]|[line,column] )</tt></h3><p>
810
This function translates between line/column coordinates and linear position (offset from beginning of document).<br>
812
<p>The syntax takes three forms:</p>
815
With <i>no</i> arguments, it returns the rectangular coordinates of the current caret position:<br>
816
<tt> line, column = geany.rowcol()</tt><br>
817
( Note that in Lua a single function call like the one above returns both values! )<br><br>
820
With <i>one</i> argument, it it returns the rectangular coordinates of the specified <tt><b>position</b></tt>
822
<tt> line, column = geany.rowcol(position)</tt><br><br>
826
With <i>two</i> arguments, it translates from the given <tt><b>line</b></tt> and <tt><b>column</b></tt>
827
to the linear position:<br>
828
<tt> position = geany.rowcol(line,column)</tt>
832
Out-of-range arguments are adjusted to the nearest valid possibility.
835
<a name="save"></a><hr><h3><tt>geany.save ( [filename]|[index] )</tt></h3><p>
836
When called with no arguments, saves the currently active document to disk.
838
When called with a numeric argument, saves the file of that document index.
840
When called with a string argument, it will save that named document ( That is, of course, if it is open. )
843
Returns <tt><b>true</b></tt> on success, or <tt><b>false</b></tt> if the document could not be saved.</p>
847
<a name="scintilla"></a><hr><h3><tt>geany.scintilla ( msg_id [, wparam [, lparam]] )</tt></h3><p>
848
<i>Power users only!</i>
851
Sends a <tt><b>SCI_*</b></tt> message directly to the Scintilla widget of the active document.</p>
853
The <tt><b>msg_id</b></tt> can be a numeric value, or a case-insensitive string with or
854
without the <tt>"SCI_"</tt> prefix,
855
such as <tt>"SCI_POSITIONFROMPOINT"</tt>, <tt>"POSITIONFROMPOINT"</tt>, or <tt>"PositionFromPoint"</tt>.
857
The wparam, lparam, and return types depend on the particular message, based on the
858
interface described in the "<tt><small>Scintilla.iface</small></tt>" file from the Scintilla sources.
860
For API calls which expect a pre-allocated char buffer as the lparam, the allocation is
861
automatically managed
862
by the GeanyLua module, your lparam is ignored, and the return value is a Lua string.
863
In cases where the length is specified
864
in the wparam, the null terminator is not counted - if you ask for 3 chars, you get 3 chars.
866
Currently only string, numeric, and boolean types are supported, any API call that
867
expects or returns complex types will result in an error. This function tries hard to
868
protect from garbage being passed to
869
Scintilla, but ultimately <i>you</i> are expected to know what you're doing!
872
<a name="select"></a><hr><h3><tt>geany.select ( [[start,] stop]] )</tt></h3><p>
873
When called with no arguments, returns the beginning <b><i>and</i></b> ending points of
874
the current selection, in the form:<br>
876
start, stop = geany.select()
878
( Note that in Lua a single function call like the one above returns both values! )</p>
880
To find out if the selection is rectangular, test the
881
boolean variable <tt><b>geany.rectsel</b></tt> immediately after this call.
884
If this function is called with two arguments, it creates a new selection in
885
the current document.
886
<br> The selection is <i>anchored</i> at the <tt><b>start</b></tt>
887
position, and <i>extended</i> to the <tt><b>stop</b></tt> position.</p><p>
888
The boolean variable <tt><b>geany.rectsel</b></tt> can be set prior to this
890
whether this selection is created in normal or rectangular mode.
893
If called with one argument, the caret is moved to that position, but no selection is created,<br>
894
and any existing selection is lost.
898
Note that in all cases, the value of <tt><b>stop</b></tt> is considered to be
899
the end of the selection where the caret is located.</p><p>
900
So, if <tt><b>stop</b></tt> is less than <tt><b>start</b></tt>, the caret is postioned
901
at the <i>beginning</i> of the selection, <br>similar to a selection created by
902
dragging the mouse <i>backwards</i> in the document.</p>
904
<b>Hint:</b> To select the entire document, you can use:
905
<tt>geany.select( 0, geany.length() )</tt>
909
<a name="selection"></a><hr><h3><tt>geany.selection ( [content] )</tt></h3><p>
910
When called with no arguments, returns the selected text in the current Geany
911
document as a string. <br>
912
Returns the empty string if no text is selected, or <tt><b>nil</b></tt>
913
if there is no open document.
914
</p><p>When called with one argument, the selected text of the current document
915
will be replaced with the specified <tt>content</tt>
917
If no text is currently selected, the text will be inserted at the current
921
<a name="signal"></a><hr><h3><tt>geany.signal ( widget, signal )</tt></h3><p>
922
Emits a GTK signal to a given widget in the Geany user interface.</p><p>
923
The <tt>widget</tt> argument is a string identifying the widget by its Glade <tt><b>"id"</b></tt> attribute.<br>
924
The <tt>signal</tt> argument is a string identifying the signal to be emitted.
926
This function was primarily intended for activating Geany's builtin menu commands.<br>
927
For instance, to display the file open dialog you could do:<br>
928
<tt> geany.signal("menu_open1", "activate")</tt>
930
The function does not return a value, but may trigger an error message if the
931
widget name is not found or the signal name is not valid for the specified widget.
933
Note that it is generally easier and more reliable to use the <tt>keycmd()</tt> function whenever possible.
936
<a name="stat"></a><hr><h3><tt>geany.stat( filename [, lstat] )</tt></h3><p>
937
Returns a table providing some (limited) information about the specified file.<br>
938
If the information could not be obtained, the function returns <tt>nil</tt> plus an string describing the reason for failure.
941
If the file is a symbolic link, and the optional <tt>lstat</tt> argument is <tt>true</tt>, the
942
information is returned about the link itself, otherwise the table provides
943
information about the file that the link points to.
945
The returned table contains the following fields:
946
<table border="0" summary="stat table fields">
947
<tr><td width="5%"></td><td><tt>size </tt></td><td> -- The size of the file, in bytes.</td></tr>
948
<tr><td width="5%"></td><td><tt>time </tt></td><td> -- Modification time, in seconds from the epoch.</td></tr>
949
<tr><td width="5%"></td><td><tt>type </tt></td><td> -- A single-character string that denotes the type of file (see below)</td></tr>
950
<tr><td width="5%"></td><td><tt>read </tt></td><td> -- <tt>true</tt> if the effective user can read from the file.</td></tr>
951
<tr><td width="5%"></td><td><tt>write</tt></td><td> -- <tt>true</tt> if the effective user can modify the file.</td></tr>
952
<tr><td width="5%"></td><td><tt>exec </tt></td><td> -- <tt>true</tt> if the effective user can execute the file.</td></tr>
955
The <tt>type</tt> field contains one of the following values:
956
<table border="0" summary="stat table type field values">
957
<tr><td width="5%"></td><td><tt>"b" </tt></td><td> -- a block-oriented device.</td></tr>
958
<tr><td width="5%"></td><td><tt>"c" </tt></td><td> -- a character-special device.</td></tr>
959
<tr><td width="5%"></td><td><tt>"d" </tt></td><td> -- a directory.</td></tr>
960
<tr><td width="5%"></td><td><tt>"f" </tt></td><td> -- a FIFO or named pipe.</td></tr>
961
<tr><td width="5%"></td><td><tt>"l" </tt></td><td> -- a symbolic link.</td></tr>
962
<tr><td width="5%"></td><td><tt>"r" </tt></td><td> -- a regular file.</td></tr>
963
<tr><td width="5%"></td><td><tt>"s" </tt></td><td> -- a socket.</td></tr>
966
Note that this function does not support symbolic links or ACL permissions on MS-Windows.
971
<a name="text"></a><hr><h3><tt>geany.text ( [content] )</tt></h3><p>
972
When called with no arguments, returns the entire text of the currently
973
active Geany document as a string.<br>( Returns <tt><b>nil</b></tt>
974
if there is no open document.)
976
When called with one argument, the entire text of the current
977
document is replaced with the specified <tt>content</tt> string.
981
<a name="timeout"></a><hr><h3><tt>geany.timeout ( seconds )</tt></h3><p>
983
Attempts to control the maximum time allowed, in whole seconds, for the current script to
984
finish execution.</p><p>
985
By default, scripts are allowed 15 seconds to complete, but if your script needs
986
more time, you can increase it here.
988
Note that the interpreter is only able to trigger this "timeout exceeded" error when it is actually processing instructions.
989
This provides protection against things like accidentally creating an endless loop,
990
but it might still be possible to create a script that hangs indefinitely. ( For instance if
991
you call <tt>io.read()</tt> without access to a terminal. )</p><p>
992
The internal timer is paused whenever one of the dialog box functions is called,
993
to allow the user time to respond.
995
Setting the timeout to zero will disable it completely, that is, the script will never time out.
998
<a name="wkdir"></a><hr><h3><tt>geany.wkdir ( [folder] )</tt></h3><p>
999
When called with no arguments, returns the current working directory.</p>
1001
When called with one argument, tries to change into that <tt>folder</tt>,
1002
and returns <tt>true</tt> on sucess, or <tt>false</tt> plus an error message
1006
<a name="word"></a><hr><h3><tt>geany.word ( [position] )</tt></h3><p>
1007
When called with no arguments, returns the word at the current caret position.
1009
When called with one argument, returns the word at the specified
1010
<tt><b>position</b></tt>.
1012
This function can return an empty string if the position is not touching
1013
a character that is considered to be part of a word. You can modify this
1014
set of characters in the <tt><b>geany.wordchars</b></tt> variable.
1018
<a name="xsel"></a><hr><h3><tt>geany.xsel ( [text] )</tt></h3><p>
1019
When called with no arguments, returns the text-based contents of the primary X selection.
1021
When called with one argument, assigns that <tt>text</tt> as the contents of the primary X selection.
1024
This function is only valid for X-Window environments, on MS-Windows, it does nothing.
1027
<a name="yield"></a><hr><h3><tt>geany.yield ()</tt></h3><p>
1028
Temporarily returns control to the IDE, to allow user interface elements to
1029
be refreshed/repainted during lengthy script operations.
1030
</p><p>Since most scripts will probably have a run time of less than a couple of seconds,
1031
you will likely never need this function. But if you do, it should be used with caution,
1032
since it allows Geany's state to be changed during script execution. This could have
1033
unpleasant consequences, for instance if the user closes a document that the script is referencing.
1039
<!-- Dialog functions -->
1040
<h3> Dialog functions</h3>
1043
<a name="choose"></a><hr><h3><tt>geany.choose ( prompt, items )</tt></h3><p>
1044
Displays a dialog box to allow the user to choose from a list of items. </p><p>
1045
The <tt>prompt</tt> argument string will display a message above the list box
1046
to explain the request.</p><p>
1047
The <tt>items</tt> argument is a Lua table, each element of the table must be
1050
The function returns the selected item as a string:</p>
1052
<li>If the <b>OK</b> button is clicked,
1053
<li>If the [Return] key is pressed while the item list is active.
1054
<li>If the user double-clicks an item in the list.
1057
If the <b>Cancel</b> button is clicked, or if the dialog is is dismissed by
1058
some other means, e.g. by pressing the [Escape] key, the function returns
1059
<tt><b>nil</b></tt>.
1063
<a name="confirm"></a><hr><h3><tt>geany.confirm ( title, question, default )</tt></h3><p>
1064
Displays a simple yes-or-no style dialog box to ask the specified
1065
<tt>question</tt>.<br>
1066
The <tt>title</tt> argument is displayed as a bold-faced title for the dialog.
1068
Returns <tt><b>true</b></tt> if the 'Yes' button is clicked,
1069
or <tt><b>false</b></tt> if the 'No' button is
1071
If the dialog is dismissed by some other means, e.g. by pressing the
1072
[Escape] key, <br>the function will return the boolean value specified by the
1073
<tt>default</tt> argument. </p>
1074
<p>All three arguments are required, but you can pass <tt><b>nil</b></tt>
1075
as the first argument to suppress the title.
1079
<a name="input"></a><hr><h3><tt>geany.input ( [prompt] [,default] )</tt></h3><p>
1080
Displays an input dialog to prompt the user for some text. </p><p>
1081
The <tt>prompt</tt> argument string will display a message above the entry box
1082
to explain what input is requested.</p><p>
1083
The <tt>default</tt> argument string, if present, will add some pre-selected
1084
text into the entry area.</p><p>
1085
If the <b>OK</b> button is clicked, or if the [Return] key is pressed while the
1086
entry field is active, the function will return the contents of the entry field
1088
If the <b>Cancel</b> button is clicked, or if the dialog is is dismissed by
1089
some other means, e.g. by pressing the
1090
[Escape] key, the function returns <tt><b>nil</b></tt>.
1094
<a name="message"></a><hr><h3><tt>geany.message ( [title,] message )</tt></h3><p>
1095
When called with one argument, displays a simple dialog box containing
1096
the specified <tt>message</tt> string. </p>
1097
<p>When called with two arguments, the <tt>title</tt> argument is displayed as
1099
and the <tt>message</tt> argument will be the message text.
1103
<a name="pickfile"></a><hr><h3><tt>geany.pickfile ( [mode [,path [,filter]]] )</tt></h3>
1105
Displays a dialog that allows the user to select a filename.</p><p>
1106
All three arguments are optional, but you can pass <tt>nil</tt> as a placeholder to
1107
use the default value for any of the arguments.</p><p>
1108
The <tt>mode</tt> argument specifies the type of dialog, and must be one
1109
of two strings, either <tt>"open"</tt> or <tt>"save"</tt>.<br>
1110
( passing <tt>nil</tt> is the same as <tt>"open"</tt> )<br>
1111
In <tt>"save"</tt> mode the function will issue an overwrite confirmation prompt if the targeted file already exists.
1113
The <tt>path</tt> string argument sets the initial directory for the dialog, or <tt>nil</tt>
1114
to use the current directory.<br>
1115
If the last (rightmost) element of the path is an existing directory, the path will be used as-is,
1116
otherwise the last element is assumed to be a filename (whether it actually exists on disk or not)
1117
and will be parsed off and used as the suggested filename for the dialog.
1119
The <tt>filter</tt> argument controls which files are displayed,
1120
or it can be <tt>nil</tt> to display all files.<br>
1121
It is a string consisting of pairs of substrings, where each substring
1122
is separated by the pipe "<tt>|</tt>" symbol.<br>
1123
The first element in each pair of substrings is the human-readable description of the filetype,<br>
1124
and the second element of the
1125
pair is a set of semicolon-delimited shell wildcards to filter on.<br>
1126
For instance, a filter for web files might look like:<br>
1127
<tt><b> "HTML files|*.html;*.htm|PHP files|*.php;*.php4|Style sheets|*.css"</b></tt>
1129
( Those familiar with
1130
<a href="http://en.wikipedia.org/wiki/Borland_Delphi">Borland Delphi</a>
1131
might recognize this syntax from the
1132
<a href="http://www.delphibasics.co.uk/RTL.asp?Name=TOpenDialog">TOpenDialog.Filter</a> property. )
1135
Note that this function does not actually open or save anything, it merely returns the
1136
full path and filename of the selected file, or <tt>nil</tt> if the user cancels the dialog.</p>
1140
<h3>Module level variables</h3>
1142
<a name="wordchars"></a><hr><h3><tt>geany.wordchars</tt></h3><p>
1143
This variable determines which characters are considered to be part of a word.
1145
It is used by the <tt><b>geany.word()</b></tt> function and may also be reset by that
1146
function if its current value cannot be interpreted as a string.</p><p>
1147
The default value is:<br><tt>
1148
<big> <big>
1149
"_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"</big> </big></tt>
1151
If you need to modify this string, you may want to save a copy of the original
1152
so you can restore it later.
1155
<a name="rectsel"></a><hr><h3><tt>geany.rectsel</tt></h3><p>
1156
This variable controls and/or returns the "selection mode" of the current document.
1158
It is used by the <tt><b>geany.select()</b></tt> function and is adjusted
1159
when the selection is queried, and examined when the selection is set. <br>
1160
It may also be reset if its current value cannot be interpreted as a boolean.</p>
1162
A value of <tt><b>true</b></tt> represents a rectangular selection
1163
and <tt><b>false</b></tt> represents the normal linear selection mode.
1166
<a name="banner"></a><hr><h3><tt>geany.banner</tt></h3><p>
1167
This variable controls the window title for dialogs displayed by the current script.
1169
It may be reset by the dialog functions if its value cannot be interpreted as a string.
1173
<a name="caller"></a><hr><h3><tt>geany.caller</tt></h3><p>
1174
This variable stores the internal index of the document that triggered one of the <a href="./geanylua-intro.html#events">event scripts</a>.</p>
1176
For example, to print the filename of a file that has just been saved, you could put<br>
1177
this line in your <b>~/.geany/plugins/lua/events/saved.lua</b> script file:</p><p>
1178
<tt> print(geany.documents(geany.caller))</tt>
1184
This variable is only relevant for the opened, created, activated, and saved event scripts,
1185
for all other scripts it is set to zero.<br>
1189
<a name="dirsep"></a><hr><h3><tt>geany.dirsep</tt></h3><p>
1190
This variable returns the default filesystem path separator.<br>
1191
( A forward slash <tt><b>/</b></tt> for Unix or
1192
a backslash <tt><b>\</b></tt> for MS-Windows. )
1196
<a name="project"></a><hr><h3><tt>geany.project</tt></h3><p>
1197
This variable provides a reference to the <a href="geanylua-keyfile.html">GKeyFile</a> object
1198
for the project that triggered a
1199
proj-* <a href="./geanylua-intro.html#events">event script</a>.</p>
1201
The information stored in the object can be manipulated using the <tt>keyfile</tt> module.<br>
1202
For example, to print the description of the project that has just been opened, you could put<br>
1203
this line in your <b>~/.geany/plugins/lua/events/proj-opened.lua</b> script file:</p><p>
1204
<tt> print(keyfile.value(geany.project, "project", "description"))</tt>
1206
This variable is only relevant for the project-based event scripts, for all other scripts it is set to <tt>nil</tt>.<br>
1211
<a name="script"></a><hr><h3><tt>geany.script</tt></h3><p>
1212
This variable stores the full path and filename of the active script.</p>
1216
<div align="right"><small>© 2007-2008 <i>Jeff Pohlmeyer </i> </small></div>