CSS Select ( WebDevelopment Package)

CSS Select ( WebDevelopment Package)

Postby sublimator on Tue Jun 30, 2009 3:20 am

This is going to be really cool **when it's finished**; Document selections via XPath and CSS evaluations.

http://blogdata.akalias.net/css-select- ... totype.htm

Unfinished but available at:

http://bitbucket.org/sublimator/webdeve ... /wiki/Home
sublimator
 
Posts: 1123
Joined: Thu Mar 20, 2008 5:41 am

Re: CSS Select

Postby vim on Tue Jun 30, 2009 5:54 am

COOL!
vim
 
Posts: 290
Joined: Tue May 27, 2008 6:51 pm

Re: CSS Select

Postby sublimator on Tue Jun 30, 2009 8:04 am

Full node selections:

http://blogdata.akalias.net/css-select- ... ctions.htm

Should be easy enough to use lxml to select nodes closest to cursor and also have a quick panel showing all classes / #id attributes. Got to love high level languages :)
sublimator
 
Posts: 1123
Joined: Thu Mar 20, 2008 5:41 am

Re: CSS Select

Postby SteveCooperOrg on Tue Jun 30, 2009 10:18 am

That is utterly bionic.

I have a feature suggestion; if the cursor is inside a javascript string, use that as the css selector. So you can imagine code like this;

Code: Select all
    <script type="text/javascript>
        // jQuery call to display the #my-dialog div as a dialog box.
        $("#my-dialog").dialog('open');
    </script>


So if you put your cursor into the string ('#my-dialog') and press a key, it'll select the div for your dialog.

This is a very nice way for people to jump from the javascript that manipulates DOM elements straight to the elements themselves.
Maybe what you're looking for is at the http://www.sublimetextwiki.com
SteveCooperOrg
 
Posts: 185
Joined: Thu Mar 20, 2008 9:53 am

Re: CSS Select

Postby sublimator on Tue Jun 30, 2009 11:29 am

Cool idea :) I'll chuck it on ze TODO. I got the node select command working too + pretty print node. Should get it all together soon. Need to refactor some of the stuff in RelativeIndentation into helper functions. Got some html/css context specific auto-complete as well. Probably put it all in `WebDevelopment` package ( The css node stuff only works for html atm though it should be fairly easy to extend the concept to normal xml using XPath )
sublimator
 
Posts: 1123
Joined: Thu Mar 20, 2008 5:41 am

Re: CSS Select

Postby EJ12N on Tue Jun 30, 2009 2:30 pm

Nice you actually made it :D GJ
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm

Re: CSS Select

Postby sublimator on Thu Jul 02, 2009 6:26 am

Messed around and added node selection / move to node ends commands. XPath and CSS path select both work on html and xml.

http://blogdata.akalias.net/css-select- ... select.htm
sublimator
 
Posts: 1123
Joined: Thu Mar 20, 2008 5:41 am

Re: CSS Select

Postby sublimator on Thu Jul 02, 2009 1:54 pm

Select just element names, useful for renaming etc

http://blogdata.akalias.net/css-select- ... ntname.htm
sublimator
 
Posts: 1123
Joined: Thu Mar 20, 2008 5:41 am

Re: CSS Select

Postby jps on Thu Jul 02, 2009 2:19 pm

That's crazy cool!
jps
Site Admin
 
Posts: 853
Joined: Wed Mar 19, 2008 12:33 pm

Re: CSS Select

Postby sublimator on Sat Jul 04, 2009 4:43 am

sublimator
 
Posts: 1123
Joined: Thu Mar 20, 2008 5:41 am

Next

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 1 guest