Home Download Buy Blog Forum Support

Snippets in find, input panels?

Snippets in find, input panels?

Postby guillermooo on Fri May 07, 2010 9:11 am

I think this would be great, but probably unfeasible.

More enhancements to the input panel: being able to apply syntaxes in the input panel would be cool.

Both pretty low priority, anyway.
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Snippets in find, input panels?

Postby Anomareh on Fri May 07, 2010 10:51 am

Syntax highlighting should be possible as it's somewhat roughly done I think in the find and friends panels for regex. Not sure how useful it'd be but I don't think it'd be as big a deal to get working as snippets.
Anomareh
 
Posts: 222
Joined: Thu Oct 01, 2009 7:32 pm

Re: Snippets in find, input panels?

Postby jps on Fri May 07, 2010 11:11 am

The only thing stopping snippets from working in the various panels is that tab is used to move between fields, which takes precedence over normal key bindings.

You could make a snippet, and bind it to a key sequence that doesn't end it tab, and it should work fine.

With the input panel, you can set the syntax with:

Code: Select all
view = window.showInputPanel("Name", "", None, None, None)
view.options().set("syntax", "Packages/HTML/HTML.tmLanguage")
jps
Site Admin
 
Posts: 3077
Joined: Wed Mar 19, 2008 12:33 pm

Re: Snippets in find, input panels?

Postby guillermooo on Fri May 07, 2010 3:48 pm

Fantastic! I should pay more attention to the API docs...
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 17 guests