Re: [Komodo-discuss] Autocomplete for Tcl?
by Troy Topnik other posts by this author
Jul 8 2008 12:12PM messages near this date
view in the new Beta List Site
Re: [Komodo-discuss] Autocomplete for Tcl?
|
Re: [Komodo-discuss] 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@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss
Thread:
Tom SAVELL
Jeff Hobbs
Tom SAVELL
Eric Promislow
Trent Mick
Troy Topnik
Tom SAVELL
|