Sublime Forum

CSS Select ( WebDevelopment Package)

#1

COOL!

0 Likes

Zen Coding ( CSS Snippets )
#2

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;

    <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.

0 Likes

#3

Nice you actually made it :smiley: GJ

0 Likes

#4

That’s crazy cool!

0 Likes

#5

really GJ nick that takes care of the features I wanted =]

0 Likes

#6

Amazing… can’t wait to try it out :smiley:

When parsing with lxml, how do you get the actual text-file position of an element (i.e. the sublime Region)?

0 Likes

#7

does it have any special dependencies?

ImportError: No module named lxml Reloading plugin C:\...\Sublime Text\Packages\webdevelopment/tidyhtml.py Traceback (most recent call last): File ".\sublimeplugin.py", line 39, in reloadPlugin File ".\tidyhtml.py", line 15, in <module> from indentation import normed_indentation_pt, handle_tabs ImportError: No module named indentation Reloading plugin C:\...\Sublime Text\Packages\webdevelopment/tidyhtml.py Traceback (most recent call last): File ".\sublimeplugin.py", line 39, in reloadPlugin File ".\tidyhtml.py", line 15, in <module> from indentation import normed_indentation_pt, handle_tabs ImportError: No module named indentation Unknown external include source.smarty included from text.html.basic Unknown external include source.applescript included from source.shell

0 Likes

#8

[quote=“sublimator”]Ohk as EJ12N just pointed out, I’m a space cadet and haven’t been pushing the latest changes. Mostly because I need to rewrite a lot of this. The developer of lxml has given me some tips to speed it up a lot. So if you use this, or want to before The Great Rewrite don’t come bitching to me that my updates broke your configs or I changed commands etc If it blows anything up and you lose your work: TOUGH. Don’t download strange source :smile:

In any case, I just pushed the latest changes. I’d recommend getting the version of AAALoadFirstExtensions from bitbucket if you plan to have a play.

I’m sleepy. Over.[/quote]

Thanks plugin is awesome :smiley:

0 Likes

#9

I thought I saw somewhere screencast, which shows this technique with the CSS file. Was it?

0 Likes

#10

Sublimator, is it possible to eventually make the possibility to use character entities? For example, I only use the character entities, and I have all the projects is teeming with such.

0 Likes

#11

I’ll wait for that. http://forums.disenteria.ru/style_emoticons/default/agree.gif

And again, thank you for this wonderful package! http://forums.disenteria.ru/style_emoticons/default/mol.gif

0 Likes

#12

[size=150]Very cool![/size] :sunglasses:

0 Likes

#13

[quote=“sublimator”]Show xpath / highlight selections using latest beta onSelectionModified

(prototype – not on repo – yet)[/quote]

Sublimator, any news? :wink:

0 Likes

#14

I understand. But if someday this feature will be done as it should, then I’ll be very glad :wink: http://forums.disenteria.ru/style_emoticons/default/agree.gif

0 Likes

#15

I haven’t tried it with HTML but the highlighting part works pretty well with XML, without any lag:

[code]def node_highlight_cmd(key):
def wrapper(f):
def wrapped(self, view):
if view.options().getString(“syntax”) not in :
return

        view.eraseRegions(key)
        try:
            nodes, proxy = selection_nodes(view)
            if nodes:
                view.addRegions(key, [r for r in f(self, view, nodes, proxy)], "comment")
        except:
            pass
    return wrapped
return wrapper

class HighlightElementName(sublimeplugin.Plugin):
#@print_timing
@node_highlight_cmd(“elementName”)
def onSelectionModified(self, view, nodes, proxy):
for i, node in nodes:
for n in element_name_regions(view, node):
yield n
[/code]

0 Likes

#16

Unfortunately it seems, that the files cant be loaded from bitbucket.org. Would it possible to load the files from another Source like github.com or that you update to a free, unlimited Community Account here bitbucket.org/plans

0 Likes