Hi,
I have a list of functions ( thousands ) for a certain proprietary language and I would like to enable some sort of autocomplete in textmate but that works similar to Eclipse's, IDEA's, etc. in that it allows you to 1. Search or autocomplete 2. Once you select the method, you get a "snippet" template so you can tab around the parameters
I imagine lots of people have tried this and I am also afraid that there is no simple solution.
What's the best path here?
FYI. The library consists of around 2000 functions.
Regards, A
On 27 Aug 2010, at 21:00, Aldo Bucchi wrote:
[...] I would like to enable some sort of autocomplete in textmate but that works similar to Eclipse's, IDEA's, etc.
When you say “enable”, are you referring to checking a box and magically get the support? Or actually write code to provide the functionality? The former is not possible.
[...] I imagine lots of people have tried this and I am also afraid that there is no simple solution.
Well, C/Objectice-C and the PHP bundles have pretty decent completion systems. Not sure if it lives up to what you want, or what your skill level is wrt writing code. These are all “custom”.
Thomas (subtleGradient) also did a more “declarative” system, but I am afraid there is no documentation on this, and last I looked at it, there are some things I’d like to get fixed/improved — it is used by the HTML and CSS bundles (perhaps also JavaScript).
Hi Allan,
On Tue, Aug 31, 2010 at 4:26 AM, Allan Odgaard mailinglist@textmate.org wrote:
On 27 Aug 2010, at 21:00, Aldo Bucchi wrote:
[...] I would like to enable some sort of autocomplete in textmate but that works similar to Eclipse's, IDEA's, etc.
When you say “enable”, are you referring to checking a box and magically get the support? Or actually write code to provide the functionality? The former is not possible.
Sorry. I meant writing code. I just joined this list and I now realize there is a wide spectrum regarding coding skills. I can code ;)
[...] I imagine lots of people have tried this and I am also afraid that there is no simple solution.
Well, C/Objectice-C and the PHP bundles have pretty decent completion systems. Not sure if it lives up to what you want, or what your skill level is wrt writing code. These are all “custom”.
Thomas (subtleGradient) also did a more “declarative” system, but I am afraid there is no documentation on this, and last I looked at it, there are some things I’d like to get fixed/improved — it is used by the HTML and CSS bundles (perhaps also JavaScript).
Thanks, will definitely take a look at them. Notice that this is exactly the kind of reply I was expecting. I was inspecting the bundles and noticed divergent strategies...
Regards, A
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On 31 Aug 2010, at 16:33, Aldo Bucchi wrote:
[...] Sorry. I meant writing code. I just joined this list and I now realize there is a wide spectrum regarding coding skills. I can code ;)
Great :)
In that case, the main ingrediant is the dialog plug-in.
If you open a new TextMate document and press ⌃R on the following line:
"$DIALOG" help
It will show the available options for “showing dialogs” (⌃R runs the current line as a shell command).
More specifically you want to use the popup command ("$DIALOG" help popup).
I think the initial version of the Objectice-C completion was a simply command¹ which did something like:
#!/usr/bin/env ruby list = `grep "^$TM_CURRENT_WORD" "$TM_BUNDLE_SUPPORT/ completions.tsf"`.split("\t")
Then used "$DIALOG" to show the matches (and insert the chosen one as a snippet).
Hi Allan,
On Tue, Aug 31, 2010 at 12:48 PM, Allan Odgaard mailinglist@textmate.org wrote:
On 31 Aug 2010, at 16:33, Aldo Bucchi wrote:
[...] Sorry. I meant writing code. I just joined this list and I now realize there is a wide spectrum regarding coding skills. I can code ;)
Great :)
In that case, the main ingrediant is the dialog plug-in.
If you open a new TextMate document and press ⌃R on the following line:
"$DIALOG" help
It will show the available options for “showing dialogs” (⌃R runs the current line as a shell command).
More specifically you want to use the popup command ("$DIALOG" help popup).
I think the initial version of the Objectice-C completion was a simply command¹ which did something like:
#!/usr/bin/env ruby list = `grep "^$TM_CURRENT_WORD" "$TM_BUNDLE_SUPPORT/completions.tsf"`.split("\t")
Then used "$DIALOG" to show the matches (and insert the chosen one as a snippet).
Works great ;)
Now, I am trying to push the envelope a bit.
I would love to provide a very verbose "display" text ( which includes not only the name of the item but also a description ).
So, today:
my_fun... shows popup menu with two items: ** my_function ** my_funnel selecting "my_function" inserts "my_function" and then triggers an "insert snippet"
Tomorrow:
my_fun... shows popup menu with two items: ** my_function( string a, string b ). some explanation ** my_funnel( string a ). some explanation selecting "my_function( string a, string b ). some explanation" inserts "my_function" and then triggers an "insert snippet"
I tried to achieve this, but the main issue is that Dialog.popup() inserts the "display" text by default. So I end up with:
"my_function( string a, string b ). some explanation. ( string, string b)"
where the second part is the snippet.
Having coded Eclipse and IDEA plugins, I'm impressed with the flexibility of the system. Of course I miss having a full blown parse tree to work with but... it feels like I can go 80% of the way with 20% of the effort.
Regards, A
¹ http://manual.macromates.com/en/commands
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Hi Aldo,
Are you planning on sharing your work?
On 11/09/2010, at 3:56 AM, Aldo Bucchi wrote:
Hi Allan,
On Tue, Aug 31, 2010 at 12:48 PM, Allan Odgaard mailinglist@textmate.org wrote:
On 31 Aug 2010, at 16:33, Aldo Bucchi wrote:
[...] Sorry. I meant writing code. I just joined this list and I now realize there is a wide spectrum regarding coding skills. I can code ;)
Great :)
In that case, the main ingrediant is the dialog plug-in.
If you open a new TextMate document and press ⌃R on the following line:
"$DIALOG" help
It will show the available options for “showing dialogs” (⌃R runs the current line as a shell command).
More specifically you want to use the popup command ("$DIALOG" help popup).
I think the initial version of the Objectice-C completion was a simply command¹ which did something like:
#!/usr/bin/env ruby list = `grep "^$TM_CURRENT_WORD" "$TM_BUNDLE_SUPPORT/completions.tsf"`.split("\t")
Then used "$DIALOG" to show the matches (and insert the chosen one as a snippet).
Works great ;)
Now, I am trying to push the envelope a bit.
I would love to provide a very verbose "display" text ( which includes not only the name of the item but also a description ).
So, today:
my_fun... shows popup menu with two items: ** my_function ** my_funnel selecting "my_function" inserts "my_function" and then triggers an "insert snippet"
Tomorrow:
my_fun... shows popup menu with two items: ** my_function( string a, string b ). some explanation ** my_funnel( string a ). some explanation selecting "my_function( string a, string b ). some explanation" inserts "my_function" and then triggers an "insert snippet"
I tried to achieve this, but the main issue is that Dialog.popup() inserts the "display" text by default. So I end up with:
"my_function( string a, string b ). some explanation. ( string, string b)"
where the second part is the snippet.
Having coded Eclipse and IDEA plugins, I'm impressed with the flexibility of the system. Of course I miss having a full blown parse tree to work with but... it feels like I can go 80% of the way with 20% of the effort.
Regards, A
¹ http://manual.macromates.com/en/commands
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
-- Aldo Bucchi @aldonline skype:aldo.bucchi http://aldobucchi.com/
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Hi Luke,
On Sun, Sep 12, 2010 at 11:00 PM, Luke Daley ld@ldaley.com wrote:
Hi Aldo,
Are you planning on sharing your work?
Yes, but its still too early to encourage others to try. I'm still getting my head around TextMate. http://github.com/aldonline/LinkedDataMate/wiki
On 11/09/2010, at 3:56 AM, Aldo Bucchi wrote:
Hi Allan,
On Tue, Aug 31, 2010 at 12:48 PM, Allan Odgaard mailinglist@textmate.org wrote:
On 31 Aug 2010, at 16:33, Aldo Bucchi wrote:
[...] Sorry. I meant writing code. I just joined this list and I now realize there is a wide spectrum regarding coding skills. I can code ;)
Great :)
In that case, the main ingrediant is the dialog plug-in.
If you open a new TextMate document and press ⌃R on the following line:
"$DIALOG" help
It will show the available options for “showing dialogs” (⌃R runs the current line as a shell command).
More specifically you want to use the popup command ("$DIALOG" help popup).
I think the initial version of the Objectice-C completion was a simply command¹ which did something like:
#!/usr/bin/env ruby list = `grep "^$TM_CURRENT_WORD" "$TM_BUNDLE_SUPPORT/completions.tsf"`.split("\t")
Then used "$DIALOG" to show the matches (and insert the chosen one as a snippet).
Works great ;)
Now, I am trying to push the envelope a bit.
I would love to provide a very verbose "display" text ( which includes not only the name of the item but also a description ).
So, today:
my_fun... shows popup menu with two items: ** my_function ** my_funnel selecting "my_function" inserts "my_function" and then triggers an "insert snippet"
Tomorrow:
my_fun... shows popup menu with two items: ** my_function( string a, string b ). some explanation ** my_funnel( string a ). some explanation selecting "my_function( string a, string b ). some explanation" inserts "my_function" and then triggers an "insert snippet"
I tried to achieve this, but the main issue is that Dialog.popup() inserts the "display" text by default. So I end up with:
"my_function( string a, string b ). some explanation. ( string, string b)"
where the second part is the snippet.
Having coded Eclipse and IDEA plugins, I'm impressed with the flexibility of the system. Of course I miss having a full blown parse tree to work with but... it feels like I can go 80% of the way with 20% of the effort.
Regards, A
¹ http://manual.macromates.com/en/commands
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
-- Aldo Bucchi @aldonline skype:aldo.bucchi http://aldobucchi.com/
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On 14/09/2010, at 1:04 AM, Aldo Bucchi wrote:
Are you planning on sharing your work?
Yes, but its still too early to encourage others to try. I'm still getting my head around TextMate. http://github.com/aldonline/LinkedDataMate/wiki
Great. I maintain the Java and Groovy bundles so am keen to try and incorporate this in if it gets to prime time status.