Revision: 1960 http://geany.svn.sourceforge.net/geany/?rev=1960&view=rev Author: eht16 Date: 2007-10-18 12:55:21 -0700 (Thu, 18 Oct 2007)
Log Message: ----------- Add special key wordchars to autocomplete.conf to let the user redefine used wordchars.
Modified Paths: -------------- trunk/ChangeLog trunk/data/autocomplete.conf trunk/doc/geany.html trunk/doc/geany.txt trunk/src/editor.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-10-18 18:19:17 UTC (rev 1959) +++ trunk/ChangeLog 2007-10-18 19:55:21 UTC (rev 1960) @@ -2,6 +2,9 @@
* src/plugindata.h, src/plugins.c: Add encoding related functions to the plugin API. + * data/autocomplete.conf, doc/geany.txt, doc/geany.html, src/editor.c: + Add special key wordchars to autocomplete.conf to let the user + redefine used wordchars.
2007-10-18 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/data/autocomplete.conf =================================================================== --- trunk/data/autocomplete.conf 2007-10-18 18:19:17 UTC (rev 1959) +++ trunk/data/autocomplete.conf 2007-10-18 19:55:21 UTC (rev 1960) @@ -24,11 +24,14 @@ # special keys to be used in other completions, cannot be used "standalone" # can be used by %key%, e.g. %brace_open% # nesting of special keys is not supported (e.g. brace_open=\n{\n%brace_close% won't work) +# key "wordchars" is very special, it defines the word delimiting characters when looking for +# a word to auto complete, leave commented to use the default wordchars [Special] brace_open=\n{\n\t brace_close=}\n block=\n{\n\t\n}\n block_cursor=\n{\n\t%cursor%\n}\n +#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
[C++] for=for (int i = 0; i < %cursor%; i++)%brace_open%\n%brace_close%
Modified: trunk/doc/geany.html =================================================================== --- trunk/doc/geany.html 2007-10-18 18:19:17 UTC (rev 1959) +++ trunk/doc/geany.html 2007-10-18 19:55:21 UTC (rev 1960) @@ -3,7 +3,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" /> +<meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" /> <title>Geany</title> <meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" /> <meta name="date" content="2007-10-02" /> @@ -135,7 +135,7 @@ <tr><th class="docinfo-name">Date:</th> <td>2007-10-02</td></tr> <tr><th class="docinfo-name">Version:</th> -<td>0.12</td></tr> +<td>0.13</td></tr> </tbody> </table> <p>Copyright © 2005-2007</p> @@ -882,6 +882,12 @@ <p>Everytime you write <tt class="docutils literal"><span class="pre">myname</span></tt> <TAB> in Geany, it will replace "myname" with "Enrico Tröger". The key to start auto completion can be changed in the preferences dialog, by default it is TAB.</p> +<p>You may change the behaviour Geany recognizes the word to auto complete, +i.e. where define the start and end of a word. The section "Special" may +contain a key "wordchars" which lists all characters a string may contain +to be recognized as a word for auto completion. Leave it commented to use +default characters or define it to add or remove characters to fit your +needs.</p> </div> <div class="section"> <h3><a class="toc-backref" href="#id31" id="inserting-unicode-characters" name="inserting-unicode-characters">Inserting unicode characters</a></h3> @@ -2340,7 +2346,7 @@ </tr> <tr><td>geanyversion</td> <td>The actual Geany version, e.g. -"Geany 0.12".</td> +"Geany 0.13".</td> <td>filetypes, file header, function description, ChangeLog entry, bsd, gpl</td> @@ -2391,7 +2397,7 @@ look, run "<tt class="docutils literal"><span class="pre">make</span> <span class="pre">doc</span></tt>" in the subdirectory <tt class="docutils literal"><span class="pre">doc</span></tt> of Geany's source directory. This regenerates the <tt class="docutils literal"><span class="pre">geany.html</span></tt> file. To generate a PDF file, use the command "<tt class="docutils literal"><span class="pre">make</span> <span class="pre">pdf</span></tt>" which should generate a file called -geany-0.12.pdf.</p> +geany-0.13.pdf.</p> <p>After you are happy with your changes, create a patch:</p> <pre class="literal-block"> % svn diff geany.txt > foo.patch @@ -3086,7 +3092,7 @@ <div class="footer"> <hr class="footer" /> <a class="reference" href="geany.txt">View document source</a>. -Generated on: 2007-10-02 16:10 UTC. +Generated on: 2007-10-18 19:44 UTC. Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
Modified: trunk/doc/geany.txt =================================================================== --- trunk/doc/geany.txt 2007-10-18 18:19:17 UTC (rev 1959) +++ trunk/doc/geany.txt 2007-10-18 19:55:21 UTC (rev 1960) @@ -1,4 +1,4 @@ -.. |(version)| replace:: 0.12 +.. |(version)| replace:: 0.13
======= Geany @@ -639,7 +639,14 @@ with "Enrico Tröger". The key to start auto completion can be changed in the preferences dialog, by default it is TAB.
+You may change the behaviour Geany recognizes the word to auto complete, +i.e. where define the start and end of a word. The section "Special" may +contain a key "wordchars" which lists all characters a string may contain +to be recognized as a word for auto completion. Leave it commented to use +default characters or define it to add or remove characters to fit your +needs.
+ Inserting unicode characters ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Modified: trunk/src/editor.c =================================================================== --- trunk/src/editor.c 2007-10-18 18:19:17 UTC (rev 1959) +++ trunk/src/editor.c 2007-10-18 19:55:21 UTC (rev 1960) @@ -1231,6 +1231,7 @@ { gboolean result = FALSE; gint lexer, style; + gchar *wc; ScintillaObject *sci;
if (! DOC_IDX_VALID(idx)) @@ -1244,7 +1245,8 @@ lexer = SSM(sci, SCI_GETLEXER, 0, 0); style = SSM(sci, SCI_GETSTYLEAT, pos - 2, 0);
- editor_find_current_word(sci, pos, current_word, sizeof current_word, NULL); + wc = ac_find_completion_by_name("Special", "wordchars"); + editor_find_current_word(sci, pos, current_word, sizeof current_word, wc);
// prevent completion of "for " if (! isspace(sci_get_char_at(sci, pos - 1))) // pos points to the line end char so use pos -1 @@ -1254,6 +1256,7 @@ sci_end_undo_action(sci); }
+ g_free(wc); return result; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.