Dear devels Please read below.
On Tue, 23 Feb 2010 08:35:50 +1100 Lex Trotman elextr@gmail.com wrote:
On 23 February 2010 00:57, Jon Senior jon@restlesslemon.co.uk wrote:
On Mon, 22 Feb 2010 13:25:49 +0000 Liviu Andronic landronimirc@gmail.com wrote:
I've been investigating filetypes.r to see if it is possible to make Geany more friendly (when <ctrl>+right/left, selecting, double-click selecting, etc.) toward strings containing "." (dot), and I noticed this line:
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
Changing it to
wordchars=._abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
doesn't seem to make a difference, although the documentation specifies that "wordchars These characters define word boundaries when making selections and searching using word matching options."
Any ideas on what's going wrong?
I might be wrong, but I think that some of the stuff in the filetypes.foo files has now been taken over by Scintilla. Certainly, Scintilla seems to be responsible for comments and I'd suspect that you can change the comment start parameter to whatever you like with no ill effects!
It has no effect because the Scintilla R parser ignores the wordchars argument and instead uses its own hard coded definition (which has a bug). Which parts of the filetype definition files are actually used is dependent on the parser for the particular language. Unfortunately I know of no documentation in the Scintilla project (other than the code:-) that defines what capabilities each parser has and what parameters are used.
I've filed a bug report against Scintilla [1] but it was invalidated since SciTE, hence Scintilla, could be configured to consider a "." (dot) character as part of the word in a *.R file. What it needed was to replace word.characters.$(file.patterns.r)=$(word.chars.r)
with word.characters.$(file.patterns.r)=.$(word.chars.r)
(note the right-hand dot) in the r.properties file. Can this setting be translated to Geany?
Thank you Liviu
[1] https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3042949...
On Wed, 11 Aug 2010 19:53:25 +0100 Liviu Andronic landronimirc@gmail.com wrote:
I've been investigating filetypes.r to see if it is possible to make Geany more friendly (when <ctrl>+right/left, selecting, double-click selecting, etc.) toward strings containing "." (dot), and I noticed this line:
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
Changing it to
wordchars=._abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
doesn't seem to make a difference, although the documentation specifies that "wordchars These characters define word boundaries when making selections and searching using word matching options."
Any ideas on what's going wrong?
The R wordchars setting including '.' is being overridden by the default filetypes.common whitespace_chars setting, which includes '.'.
If you remove '.' from whitespace_chars then it seems to work, but that affects all filetypes word boundary definition: http://www.geany.org/manual/index.html#id6
There is no per-filetype whitespace_chars setting.
Regards, Nick
Hello Nick Thanks for looking into this.
On Thu, 12 Aug 2010 13:10:34 +0100 Nick Treleaven nick.treleaven@btinternet.com wrote:
The R wordchars setting including '.' is being overridden by the default filetypes.common whitespace_chars setting, which includes '.'.
If you remove '.' from whitespace_chars then it seems to work, but that affects all filetypes word boundary definition: http://www.geany.org/manual/index.html#id6
Strangely, I cannot get this to work. I have the following sh>cat "/home/liviu/.config/geany/filedefs/filetypes.common" | grep -i sh>whitespace_chars (21739) #whitespace_chars=\s\t!"#$%&'()*+,-./:;<=>?@[\]^`{|}~ whitespace_chars=\s\t!"#$%&'()*+,-/:;<=>?@[\]^`{|}~ sh>cat ... /filedefs/filetypes.common" | grep -i whitespace_chars sh>(21739) returned '0'
but upon restart Geany still doesn't consider a "." as part of the word, either for R or for "untitled" files. Also, filetypes.r is the default one shipped with Geany. I must be doing smth wrong.
There is no per-filetype whitespace_chars setting.
Should I file a bug report? Regards Liviu