I know that autocompletion exists in many bundles but requires you to push ecsape to get it up, is there a way to do the following with a bundle?
Lets assume I am editing a PHP document and type "s", the bundle (or even better, TM2 ;)) looks up a list of function names and then outputs after the s, the first keyword in the list that starts with "s". However, that extra text is left as selected, if the user continues to type then they will overwrite the text (and it will alter it's guess accordingly) but if the user hits the relevant key, it leaves the selected text in place and puts the caret (I think that's the name) at the end of the word.
If it's not possible in a bundle, is there any chance of seeing something like it in TM2?
Thanks Teifion
–––––––––––––––––– http://woarl.com/blog
On 4 Jun 2008, at 12:44, Teifion Jordan wrote:
Lets assume I am editing a PHP document and type "s", the bundle (or even better, TM2 ;)) looks up a list of function names and then outputs after the s, the first keyword in the list that starts with "s". However, that extra text is left as selected, if the user continues to type then they will overwrite the text (and it will alter it's guess accordingly) but if the user hits the relevant key, it leaves the selected text in place and puts the caret (I think that's the name) at the end of the word.
If it's not possible in a bundle, is there any chance of seeing something like it in TM2?
This is also possible with TM 1.x
You have to install DIALOG2 ('only' source code available; you have to compile it) and you have to look for the latest bundle versions whether the author(s) wrote a routine to support DIALOG2.
tm_dialog2 provides such a functionality 'ExtendedPopUp'. You type 's' press the the key for auto-complete. A popup window appears with all suggestions beginning with 's'. But you type further to narrow down the list.
--Hans
Thanks Hans, that's awesome.
One problem, where can I find DIALOG2? I looked at the bundles directory but have no idea where else would be smart to look.
Thanks Teifion
On 4 Jun 2008, at 12:03, Hans-Joerg Bibiko wrote:
On 4 Jun 2008, at 12:44, Teifion Jordan wrote:
Lets assume I am editing a PHP document and type "s", the bundle (or even better, TM2 ;)) looks up a list of function names and then outputs after the s, the first keyword in the list that starts with "s". However, that extra text is left as selected, if the user continues to type then they will overwrite the text (and it will alter it's guess accordingly) but if the user hits the relevant key, it leaves the selected text in place and puts the caret (I think that's the name) at the end of the word.
If it's not possible in a bundle, is there any chance of seeing something like it in TM2?
This is also possible with TM 1.x
You have to install DIALOG2 ('only' source code available; you have to compile it) and you have to look for the latest bundle versions whether the author(s) wrote a routine to support DIALOG2.
tm_dialog2 provides such a functionality 'ExtendedPopUp'. You type 's' press the the key for auto-complete. A popup window appears with all suggestions beginning with 's'. But you type further to narrow down the list.
--Hans
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
–––––––––––––––––– http://woarl.com/blog
On 4 Jun 2008, at 13:13, Teifion Jordan wrote:
Thanks Hans, that's awesome.
One problem, where can I find DIALOG2? I looked at the bundles directory but have no idea where else would be smart to look.
DIALOG2 is not a bundle, it's a plug-in.
You can find it here: http://macromates.com/svn/Bundles/branches/WIP/Tools/
You should use the Subversion Bundle to check out http://macromates.com/svn/Bundles/branches/WIP/Tools/Dialog2/ ; save this to your hard disk; open it with XCode and compile it; restart TM; look in the TM mailing list for examples how it works.
--Hans
You should use the Subversion Bundle to check out http://macromates.com/svn/Bundles/branches/WIP/Tools/Dialog2/ ; save this to your hard disk; open it with XCode and compile it; restart TM; look in the TM mailing list for examples how it works.
--Hans
I've been looking for something like this. I downloaded, compiled, and installed but I can't seem to find out how or what I have to do to activate it. I searched the last few months on the mailing list (manually) and didn't find any pointers on how to use it. I did actually find a trail of messages in April and March which included you (Hans) saying the following:
Maybe it's worth to write a tiny manual for DIALOG2 ;) -- Hans
I haven't seen anything since then that may have been sort of like a HOWTO or where I can download some DIALOG2 commands people have made. I found a single pastie and video that look promising. http://www.bibiko.de/TM_DIALOG2_popup_lookup.mov
Most helpful has been the following hint at how to work with it: http://lists.macromates.com/pipermail/textmate/2008-March/024876.html
Any updates or pointers/examples to get started with DIALOG2?
Thanks, Joe P
On 5 Jun 2008, at 04:58, Joseph Pecoraro wrote:
You should use the Subversion Bundle to check out http://macromates.com/svn/Bundles/branches/WIP/Tools/Dialog2/ ; save this to your hard disk; open it with XCode and compile it; restart TM; look in the TM mailing list for examples how it works.
The last item is the important one. Up to now there are only a very few command supporting DIALOG2. I guess completion for Obj-C. All other commands are in the Review, because DIALOG2 is still under construction.
If you want to try it out, you can create the following tmcommand. [ In beforehand you should upgrade ui.rb in /Applications/TextMate.app/ Contents/SharedSupport/Support/lib with http://macromates.com/svn/Bundles/trunk/Review/Support/lib/ui.rb ]
#!/usr/bin/env ruby -wKU
require ENV['TM_SUPPORT_PATH'] + '/lib/textmate.rb' require ENV['TM_SUPPORT_PATH'] + '/lib/ui.rb'
@choices = [ {'display' => 'instant'}, {'display' => 'instantly'}, {'display' => 'insert'}, {'display' => 'inserting'}, {'display' => 'branch'}, {'display' => 'brunch'}, ]
TextMate::UI.complete(@choices)
type e.g. "in" and invoke that command, type "se" or press BACKSPACE twice or four times etc.
In http://macromates.com/svn/Bundles/trunk/Review/Support/lib/ui.rb you see some further examples.
--Hans
Thanks Hans! I'll take a look after work today.
- Joe P
On Jun 5, 2008, at 3: 04AM, Hans-Joerg Bibiko wrote:
On 5 Jun 2008, at 04:58, Joseph Pecoraro wrote:
You should use the Subversion Bundle to check out http://macromates.com/svn/Bundles/branches/WIP/Tools/Dialog2/ ; save this to your hard disk; open it with XCode and compile it; restart TM; look in the TM mailing list for examples how it works.
The last item is the important one. Up to now there are only a very few command supporting DIALOG2. I guess completion for Obj-C. All other commands are in the Review, because DIALOG2 is still under construction.
If you want to try it out, you can create the following tmcommand. [ In beforehand you should upgrade ui.rb in /Applications/TextMate.app/ Contents/SharedSupport/Support/lib with http://macromates.com/svn/Bundles/trunk/Review/Support/lib/ui.rb ]
#!/usr/bin/env ruby -wKU
require ENV['TM_SUPPORT_PATH'] + '/lib/textmate.rb' require ENV['TM_SUPPORT_PATH'] + '/lib/ui.rb'
@choices = [ {'display' => 'instant'}, {'display' => 'instantly'}, {'display' => 'insert'}, {'display' => 'inserting'}, {'display' => 'branch'}, {'display' => 'brunch'}, ]
TextMate::UI.complete(@choices)
type e.g. "in" and invoke that command, type "se" or press BACKSPACE twice or four times etc.
In http://macromates.com/svn/Bundles/trunk/Review/Support/lib/ui.rb you see some further examples.
--Hans
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate