|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
Autocomplete for Tcl?I use Komodo for Tcl development. I really want auto-complete. But it seems like it is not implemented for Tcl. How can I get auto-complete for Tcl? The other editor I have used made it very easy to implement auto-complete, and they included a basic Tcl auto-complete template. I was able to easily edit the template to customize it to my preferred style. -Tom Notice The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying or distribution of the message, or any action taken by you in reliance on it, is prohibited and may be unlawful. If you have received this message in error, please delete it and contact the sender immediately. Thank you. _______________________________________________ Komodo-discuss mailing list Komodo-discuss@... To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss |
||||||||||
|
|
Re: Autocomplete for Tcl?Hi Tom,
Tom SAVELL wrote: > I use Komodo for Tcl development. I really want auto-complete. But it > seems like it is not implemented for Tcl. > > How can I get auto-complete for Tcl? Komodo does have auto-complete for Tcl among its stable of dynamic language intelligence. If you are in a recognized Tcl file (by default, anything with .tcl), and type something like 'nam...' you should see the dropdown with all the 'namespace' options. In addition, you will have calltips when no further options are available. It is possible to have this turned off in Preferences -> Code Intelligence, but it is on by default. > The other editor I have used made it very easy to implement > auto-complete, and they included a basic Tcl auto-complete template. I > was able to easily edit the template to customize it to my preferred style. It is easy to extend the default set of known commands. These are in /path/to/Komodo/lib/support/tcl/ as the *.tip files. You can create your own .tip or extend those (they are text files in a simple format). Regards, Jeff _______________________________________________ Komodo-discuss mailing list Komodo-discuss@... To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss |
||||||||||
|
|
Re: Autocomplete for Tcl?Hi Jeff, Thanks for the quick reply. Okay, so I see that if I type pro up comes a drop-down that shows "proc", and if I hit the tab key, it types "proc" for me. What I would prefer is I type pro<tab> And it auto-completes as: ############################################################# # Procedure: # # Arguments: # None # # Returns: # Nothing # # See Also: # proc procName {args} { } It's not clear to me that this is possible with *.tip files, e.g. tcl-core.tip. Here is the entry for proc: proc <name> <args> <body> I see that the behavior of Komodo when I type "proc<space>" is that it produces a floating help box that shows "<name> <args> <body>". So I don't really see how to make the auto-complete put in an entire proc template for me. I would like the same behavior for other statements like switch, if, while, etc. Can I do this with the *.tip files? -Tom Notice The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying or distribution of the message, or any action taken by you in reliance on it, is prohibited and may be unlawful. If you have received this message in error, please delete it and contact the sender immediately. Thank you.
Hi Tom, Tom SAVELL wrote: > I use Komodo for Tcl development. I really want auto-complete. But it > seems like it is not implemented for Tcl. > > How can I get auto-complete for Tcl? Komodo does have auto-complete for Tcl among its stable of dynamic language intelligence. If you are in a recognized Tcl file (by default, anything with .tcl), and type something like 'nam...' you should see the dropdown with all the 'namespace' options. In addition, you will have calltips when no further options are available. It is possible to have this turned off in Preferences -> Code Intelligence, but it is on by default. > The other editor I have used made it very easy to implement > auto-complete, and they included a basic Tcl auto-complete template. I > was able to easily edit the template to customize it to my preferred style. It is easy to extend the default set of known commands. These are in /path/to/Komodo/lib/support/tcl/ as the *.tip files. You can create your own .tip or extend those (they are text files in a simple format). Regards, Jeff ForwardSourceID:NT00047EAA _______________________________________________ Komodo-discuss mailing list Komodo-discuss@... To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss |
||||||||||
|
|
Re: Autocomplete for Tcl?Tom SAVELL wrote:
> > Hi Jeff, > > Thanks for the quick reply. > > Okay, so I see that if I type > > pro > > up comes a drop-down that shows "proc", and if I hit the tab key, it > types "proc" for me. > > What I would prefer is I type > > pro<tab> > > And it auto-completes as: > > ############################################################# > # Procedure: > # > ... You can get this with Komodo's Abbreviations feature. http://docs.activestate.com/komodo/4.4/abbreviations.html#abbrev_top Cheers, Trent -- Trent Mick trentm at activestate.com _______________________________________________ Komodo-discuss mailing list Komodo-discuss@... To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss |
||||||||||
|
|
Re: Autocomplete for Tcl?On Tue, Jul 08, 2008 at 11:59:42AM -0700, Trent Mick wrote:
> Tom SAVELL wrote: > > > > Hi Jeff, > > > > Thanks for the quick reply. > > > > Okay, so I see that if I type > > > > pro > > > > up comes a drop-down that shows "proc", and if I hit the tab key, it > > types "proc" for me. > > > > What I would prefer is I type > > > > pro<tab> > > > > And it auto-completes as: > > > > ############################################################# > > # Procedure: > > # > > ... > > You can get this with Komodo's Abbreviations feature. > > http://docs.activestate.com/komodo/4.4/abbreviations.html#abbrev_top In fact, there's already a 'proc' abbreviation snippet in the Samples folder in the Toolbox. By default abbreviations are bound to 'Ctrl'+'T', but you can change this to 'Tab' if you wish: Edit|Preferences|Editor|Key Bindings|Commands -> Editor: Insert Abbreviation Snippet by Name When you view 'proc' snippet's properties, it looks like this: proc [[%tabstop:NAME]] {[[%tabstop:ARGS]]} { [[%tabstop]] } To get what you're looking for, you would edit the snippet to look like this: ############################################################# # Procedure: [[%tabstop:procName]] # # Arguments: # [[%tabstop:Args]] # # Returns: # [[%tabstop]] # # See Also: # proc [[%tabstop:procName]] {[[%tabstop:Args]]} { [[%tabstop]] } While you're editing the snippet's properties, you could also shorten the name to 'pro' to get it to trigger on three characters. Hope this helps. TT _______________________________________________ Komodo-discuss mailing list Komodo-discuss@... To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss |
||||||||||
|
|
Re: Autocomplete for Tcl?Hi Tom,
As of version 4.3, Komodo has supported prefix-sensitive abbreviations. They're based on three things: the language of the file you're editing, the word to the right of the cursor, and the contents of the snippet in any Toolbox folder with the path Abbreviations/<language>/<word> Komodo ships with five snippets for Tcl, including "proc", with this value: proc [[%tabstop:NAME]] {[[%tabstop:ARGS]]} { [[%tabstop]] } You would type "proc", then Ctrl-T (default keybindings), and it would expand to the above. You can easily add another snippet called "pro" to the Samples/Abbreviations/Tcl folder, with contents like this: ############################################################# # Procedure: [[%tabstop:procName]] # # Arguments: # [[%tabstop:args]] # # Returns: # [[%tabstop:Nothing]] # # See Also: # [[%tabstop:]] # proc [[%tabstop:procName]] {[[%tabstop:args]]} { [[%tabstop:]] } You would then type "pro" followed by Ctrl-T (we're working on getting Tab to work here, but it has some conflicting operations bound to it), and then tab through to set the various settings. The *.tip files are more useful for navigating through APIs. Regards, Eric Promislow Tom SAVELL wrote: > Hi Jeff, > > Thanks for the quick reply. > > Okay, so I see that if I type > > pro > > up comes a drop-down that shows "proc", and if I hit the tab key, it types > "proc" for me. > > What I would prefer is I type > > pro<tab> > > And it auto-completes as: > > ############################################################# > # Procedure: > # > # Arguments: > # None > # > # Returns: > # Nothing > # > # See Also: > # > proc procName {args} { > > } > > It's not clear to me that this is possible with *.tip files, e.g. tcl-core.tip. > Here is the entry for proc: > > proc <name> <args> <body> > > I see that the behavior of Komodo when I type "proc<space>" is that it produces > a floating help box that shows "<name> <args> <body>". So I don't really see > how to make the auto-complete put in an entire proc template for me. I would > like the same behavior for other statements like switch, if, while, etc. > > Can I do this with the *.tip files? > > -Tom > > -------------------------------------------------------------------------------- > *Notice* > The information in this message is confidential and may be legally privileged. > It is intended solely for the addressee. Access to this message by anyone else > is unauthorized. If you are not the intended recipient, any disclosure, > copying or distribution of the message, or any action taken by you in reliance > on it, is prohibited and may be unlawful. If you have received this message in > error, please delete it and contact the sender immediately. Thank you. > > > *Jeff Hobbs <jeffh@...>* > > 07/08/2008 10:54 AM > > > To > Tom SAVELL <tcs@...> > cc > komodo-discuss@... > Subject > Re: [Komodo-discuss] Autocomplete for Tcl? > > > > > > > > > Hi Tom, > > Tom SAVELL wrote: > > I use Komodo for Tcl development. I really want auto-complete. But it > > seems like it is not implemented for Tcl. > > > > How can I get auto-complete for Tcl? > > Komodo does have auto-complete for Tcl among its stable of dynamic > language intelligence. If you are in a recognized Tcl file (by default, > anything with .tcl), and type something like 'nam...' you should see the > dropdown with all the 'namespace' options. In addition, you will have > calltips when no further options are available. > > It is possible to have this turned off in Preferences -> Code > Intelligence, but it is on by default. > > > The other editor I have used made it very easy to implement > > auto-complete, and they included a basic Tcl auto-complete template. I > > was able to easily edit the template to customize it to my preferred style. > > It is easy to extend the default set of known commands. These are in > /path/to/Komodo/lib/support/tcl/ as the *.tip files. You can create > your own .tip or extend those (they are text files in a simple format). > > Regards, > > Jeff > > ForwardSourceID:NT00047EAA > > > ------------------------------------------------------------------------ > > _______________________________________________ > Komodo-discuss mailing list > Komodo-discuss@... > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss Komodo-discuss mailing list Komodo-discuss@... To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss |
||||||||||
|
|
Re: Autocomplete for Tcl?Thanks! This is exactly what I was looking for -- you've made me a happy camper :-) Thanks to EricP as well for his response... All very helpful. -Tom Notice The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying or distribution of the message, or any action taken by you in reliance on it, is prohibited and may be unlawful. If you have received this message in error, please delete it and contact the sender immediately. Thank you.
On Tue, Jul 08, 2008 at 11:59:42AM -0700, Trent Mick wrote: > Tom SAVELL wrote: > > > > Hi Jeff, > > > > Thanks for the quick reply. > > > > Okay, so I see that if I type > > > > pro > > > > up comes a drop-down that shows "proc", and if I hit the tab key, it > > types "proc" for me. > > > > What I would prefer is I type > > > > pro<tab> > > > > And it auto-completes as: > > > > ############################################################# > > # Procedure: > > # > > ... > > You can get this with Komodo's Abbreviations feature. > > http://docs.activestate.com/komodo/4.4/abbreviations.html#abbrev_top In fact, there's already a 'proc' abbreviation snippet in the Samples folder in the Toolbox. By default abbreviations are bound to 'Ctrl'+'T', but you can change this to 'Tab' if you wish: Edit|Preferences|Editor|Key Bindings|Commands -> Editor: Insert Abbreviation Snippet by Name When you view 'proc' snippet's properties, it looks like this: proc [[%tabstop:NAME]] {[[%tabstop:ARGS]]} { [[%tabstop]] } To get what you're looking for, you would edit the snippet to look like this: ############################################################# # Procedure: [[%tabstop:procName]] # # Arguments: # [[%tabstop:Args]] # # Returns: # [[%tabstop]] # # See Also: # proc [[%tabstop:procName]] {[[%tabstop:Args]]} { [[%tabstop]] } While you're editing the snippet's properties, you could also shorten the name to 'pro' to get it to trigger on three characters. Hope this helps. TT ForwardSourceID:NT00047EBE _______________________________________________ Komodo-discuss mailing list Komodo-discuss@... To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss |
| Free Forum Powered by Nabble | Forum Help |