[Geany-Users] Geany custom tags problems!

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Geany-Users] Geany custom tags problems!

Rue Sixteen
Hi folks

First, thanks to the developers and community for Geany - amazing editor!

I am in need of some help with customizing Geany. I have a set of words that I want available when I am typing text files. So I read the documentation and created a 

#############
Modified the [filetype_extensions.conf ] as below:

[Extensions]
...
txt=*.txt;

[Groups]
...
Misc=JSON;txt;

########### - copied the /usr/share/geany/filetypes.css to the file below and modified.
~/.config/geany$ more filedefs/filetypes.txt.conf 
# For complete documentation of this file, please see Geany's main documentation
[styling]
# Edit these in the colorscheme .conf file instead
default=default
.....
[keywords]
[settings]
# default extension used when saving files
extension=txt
# MIME type
mime_type=text/plain
[indentation]

###############
~/.config/geany$ more tags/txt.txt.tags 
# format=pipe
alpha|||
omega|||
gamma|||
beta|||



When I start geany from command line as geany -v this is what i see:
Geany-INFO: Geany 1.27, en_US.UTF-8
Geany-INFO: GTK 2.24.30, GLib 2.48.1
Geany-INFO: System data dir: /usr/share/geany
Geany-INFO: User config dir: /home/myuser/.config/geany

Geany-INFO: Added filetype txt (68).
Geany-INFO: Loaded:   /usr/lib/x86_64-linux-gnu/geany/saveactions.so (Save Actions)
Geany-INFO: Loaded /home/myuser/.config/geany/tags/txt.txt.tags (txt), 342 symbol(s).
Geany-INFO: /home/myuser/Documents/mydocs/notes1.txt : txt (UTF-8)
Geany-INFO: /home/myuser/Documents/mydocs/notes2.txt : txt (UTF-8)


As can be seen filetype txt is accepted, txt.txt.tags is loaded. However it seems to be loaded for file type (txt) where as my text files come up as txt (UTF-8). Needless to say my tags from autocompletion don't show up. However when I tried to set the file type to php manually and saved the tag file as php.php.tags it worked. The same with setting manual type of "txt" and loading txt.txt.tags does not work!


Any help/guidance is greatly appreciated.
Thanks 


_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany-Users] Geany custom tags problems!

Colomban Wendling
Hi,

Le 23/08/2016 à 22:33, Rue Sixteen a écrit :
> […]
>
> As can be seen filetype txt is accepted, txt.txt.tags is loaded. However
> it seems to be loaded for file type (txt) where as my text files come up
> as txt (UTF-8).

That's alright, the filetype is still "txt", the part "(UTF-8)" is the
character encoding used to load the file.

> Needless to say my tags from autocompletion don't show
> up. However when I tried to set the file type to php manually and saved
> the tag file as php.php.tags it worked. The same with setting manual
> type of "txt" and loading txt.txt.tags does not work!

Interesting.  You're hitting a subtle limitation that we should probably
handle better: we cannot use tags if they are not associated with a tag
parser (which is different from a filetype).

To work around this, you can set the `tag_parser` key in the
`[settings]` section of your custom filetype to the name of another
filetype that already has a tag parser.  This way, your tags will have a
proper "language" set on them and will be usable.  I suggest to use a
tag parser that you don't otherwise use and doesn't have other tags yet,
so you won't get unexpected completions.  I can suggest Ferite, Tcl,
COBOL, etc. -- anything you don't use and that have a tag parser.

Regards,
Colomban
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany-Users] Geany custom tags problems!

Rue Sixteen
Amazing. Thanks for such a quick response. I put tag_parser=COBOL and restarted Geany. Now it works. Now I need to go and expand the tag file with all the words I wanted :-)

I haven't seen a simpleton tutorial anywhere where this is detailed as a step by step. May be I will write one and post it somewhere.

Thanks again for rapid response and help.

On Tue, Aug 23, 2016 at 3:54 PM, Colomban Wendling <[hidden email]> wrote:
Hi,

Le 23/08/2016 à 22:33, Rue Sixteen a écrit :
> […]
>
> As can be seen filetype txt is accepted, txt.txt.tags is loaded. However
> it seems to be loaded for file type (txt) where as my text files come up
> as txt (UTF-8).

That's alright, the filetype is still "txt", the part "(UTF-8)" is the
character encoding used to load the file.

> Needless to say my tags from autocompletion don't show
> up. However when I tried to set the file type to php manually and saved
> the tag file as php.php.tags it worked. The same with setting manual
> type of "txt" and loading txt.txt.tags does not work!

Interesting.  You're hitting a subtle limitation that we should probably
handle better: we cannot use tags if they are not associated with a tag
parser (which is different from a filetype).

To work around this, you can set the `tag_parser` key in the
`[settings]` section of your custom filetype to the name of another
filetype that already has a tag parser.  This way, your tags will have a
proper "language" set on them and will be usable.  I suggest to use a
tag parser that you don't otherwise use and doesn't have other tags yet,
so you won't get unexpected completions.  I can suggest Ferite, Tcl,
COBOL, etc. -- anything you don't use and that have a tag parser.

Regards,
Colomban
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany-Users] Geany custom tags problems!

Lex Trotman
On 24 August 2016 at 07:07, Rue Sixteen <[hidden email]> wrote:
> Amazing. Thanks for such a quick response. I put tag_parser=COBOL and
> restarted Geany. Now it works. Now I need to go and expand the tag file with
> all the words I wanted :-)
>
> I haven't seen a simpleton tutorial anywhere where this is detailed as a
> step by step. May be I will write one and post it somewhere.

Suggest to post here https://wiki.geany.org/

Cheers
Lex

>
> Thanks again for rapid response and help.
>
> On Tue, Aug 23, 2016 at 3:54 PM, Colomban Wendling
> <[hidden email]> wrote:
>>
>> Hi,
>>
>> Le 23/08/2016 à 22:33, Rue Sixteen a écrit :
>> > […]
>> >
>> > As can be seen filetype txt is accepted, txt.txt.tags is loaded. However
>> > it seems to be loaded for file type (txt) where as my text files come up
>> > as txt (UTF-8).
>>
>> That's alright, the filetype is still "txt", the part "(UTF-8)" is the
>> character encoding used to load the file.
>>
>> > Needless to say my tags from autocompletion don't show
>> > up. However when I tried to set the file type to php manually and saved
>> > the tag file as php.php.tags it worked. The same with setting manual
>> > type of "txt" and loading txt.txt.tags does not work!
>>
>> Interesting.  You're hitting a subtle limitation that we should probably
>> handle better: we cannot use tags if they are not associated with a tag
>> parser (which is different from a filetype).
>>
>> To work around this, you can set the `tag_parser` key in the
>> `[settings]` section of your custom filetype to the name of another
>> filetype that already has a tag parser.  This way, your tags will have a
>> proper "language" set on them and will be usable.  I suggest to use a
>> tag parser that you don't otherwise use and doesn't have other tags yet,
>> so you won't get unexpected completions.  I can suggest Ferite, Tcl,
>> COBOL, etc. -- anything you don't use and that have a tag parser.
>>
>> Regards,
>> Colomban
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany-Users] Geany custom tags problems!

Rue Sixteen

I tried to create an account there but unfortunately it did not work. That is why I posted the article in a different place and enclose the link below.

Thanks a bunch for all your help.

http://rue16.com/read-thread.php?mxid=462

On Aug 23, 2016 4:47 PM, "Lex Trotman" <[hidden email]> wrote:
On 24 August 2016 at 07:07, Rue Sixteen <[hidden email]> wrote:
> Amazing. Thanks for such a quick response. I put tag_parser=COBOL and
> restarted Geany. Now it works. Now I need to go and expand the tag file with
> all the words I wanted :-)
>
> I haven't seen a simpleton tutorial anywhere where this is detailed as a
> step by step. May be I will write one and post it somewhere.

Suggest to post here https://wiki.geany.org/

Cheers
Lex

>
> Thanks again for rapid response and help.
>
> On Tue, Aug 23, 2016 at 3:54 PM, Colomban Wendling
> <[hidden email]> wrote:
>>
>> Hi,
>>
>> Le 23/08/2016 à 22:33, Rue Sixteen a écrit :
>> > […]
>> >
>> > As can be seen filetype txt is accepted, txt.txt.tags is loaded. However
>> > it seems to be loaded for file type (txt) where as my text files come up
>> > as txt (UTF-8).
>>
>> That's alright, the filetype is still "txt", the part "(UTF-8)" is the
>> character encoding used to load the file.
>>
>> > Needless to say my tags from autocompletion don't show
>> > up. However when I tried to set the file type to php manually and saved
>> > the tag file as php.php.tags it worked. The same with setting manual
>> > type of "txt" and loading txt.txt.tags does not work!
>>
>> Interesting.  You're hitting a subtle limitation that we should probably
>> handle better: we cannot use tags if they are not associated with a tag
>> parser (which is different from a filetype).
>>
>> To work around this, you can set the `tag_parser` key in the
>> `[settings]` section of your custom filetype to the name of another
>> filetype that already has a tag parser.  This way, your tags will have a
>> proper "language" set on them and will be usable.  I suggest to use a
>> tag parser that you don't otherwise use and doesn't have other tags yet,
>> so you won't get unexpected completions.  I can suggest Ferite, Tcl,
>> COBOL, etc. -- anything you don't use and that have a tag parser.
>>
>> Regards,
>> Colomban
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany-Users] Geany custom tags problems!

Enrico Tröger
Woohoo, thanks for the howto.

Regarding the wiki account, your account was created properly. Could you
elaborate about your problems?

You can also PM me, if you don't want to spam the mailing list.

Regards,
Enrico

On 24/08/16 21:49, Rue Sixteen wrote:

> I tried to create an account there but unfortunately it did not work. That
> is why I posted the article in a different place and enclose the link below.
>
> Thanks a bunch for all your help.
>
> http://rue16.com/read-thread.php?mxid=462
> On Aug 23, 2016 4:47 PM, "Lex Trotman" <[hidden email]> wrote:
>
>> On 24 August 2016 at 07:07, Rue Sixteen <[hidden email]> wrote:
>>> Amazing. Thanks for such a quick response. I put tag_parser=COBOL and
>>> restarted Geany. Now it works. Now I need to go and expand the tag file
>> with
>>> all the words I wanted :-)
>>>
>>> I haven't seen a simpleton tutorial anywhere where this is detailed as a
>>> step by step. May be I will write one and post it somewhere.
>>
>> Suggest to post here https://wiki.geany.org/
>>
>> Cheers
>> Lex
>>
>>>
>>> Thanks again for rapid response and help.
>>>
>>> On Tue, Aug 23, 2016 at 3:54 PM, Colomban Wendling
>>> <[hidden email]> wrote:
>>>>
>>>> Hi,
>>>>
>>>> Le 23/08/2016 à 22:33, Rue Sixteen a écrit :
>>>>> […]
>>>>>
>>>>> As can be seen filetype txt is accepted, txt.txt.tags is loaded.
>> However
>>>>> it seems to be loaded for file type (txt) where as my text files come
>> up
>>>>> as txt (UTF-8).
>>>>
>>>> That's alright, the filetype is still "txt", the part "(UTF-8)" is the
>>>> character encoding used to load the file.
>>>>
>>>>> Needless to say my tags from autocompletion don't show
>>>>> up. However when I tried to set the file type to php manually and
>> saved
>>>>> the tag file as php.php.tags it worked. The same with setting manual
>>>>> type of "txt" and loading txt.txt.tags does not work!
>>>>
>>>> Interesting.  You're hitting a subtle limitation that we should probably
>>>> handle better: we cannot use tags if they are not associated with a tag
>>>> parser (which is different from a filetype).
>>>>
>>>> To work around this, you can set the `tag_parser` key in the
>>>> `[settings]` section of your custom filetype to the name of another
>>>> filetype that already has a tag parser.  This way, your tags will have a
>>>> proper "language" set on them and will be usable.  I suggest to use a
>>>> tag parser that you don't otherwise use and doesn't have other tags yet,
>>>> so you won't get unexpected completions.  I can suggest Ferite, Tcl,
>>>> COBOL, etc. -- anything you don't use and that have a tag parser.
>>>>
>>>> Regards,
>>>> Colomban
>>>> _______________________________________________
>>>> Users mailing list
>>>> [hidden email]
>>>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>>
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>



_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users

signature.asc (207 bytes) Download Attachment
Loading...