How to make a reverse way in ZenCoding - emmet

Is possible in Zencoding in the opposite way?
For example, i have the HTML code
<div id="test"><span></span></div>
=> i mark this block of code , push some shortcut and result is div#test>span
Need opposite way in ZenCoding (for some testing and any adjustments to the existing code generated)
Thanks
(Im using Sublime Text with ZenCoding (new with newest Emmet)

It's not available in current version.
There is a thread about this feature request: https://github.com/emmetio/emmet/issues/93
Feel free to join and discuss.

Related

Automatic generation of HAML from HTML in SublimeText 2?

I would like to have SublimeText show the HTML result of parsing my HAML in another window, live, as I type the HAML.
Does anyone have an idea of how to make this happen? In, e.g., WebStorm there are file watchers that do this, but is there something like that built into ST2?
I did something similar to this with Typescript, only I only updated the Javascript output when I saved the file. First, I would say to take a look at SublimeBuildOnSave. That'll show you how to hook into the save function and see what file is being saved.
When you've got the general idea, you can take a look here and mess around with opening another pane (or using the existing pane) to show the compiled output.
It's pretty simple to make a simple version of this. If you want more advanced features like live compiling, it'll take a bit more effort, but it's not impossible. But the above scenario worked just fine for Typescript for me. (If I find where I left that code, I'll post it.)

Quick Help for user defined function in ios

How to show Quick Help for the methods which we wrote ...?
Like for inbuilt function when we right click on it & Click Quick Help then we get all info about that method like that I want to do for user defined methods so that any one come to know that method takes which parameter and each parameter for which purpose?
For more explanation, see these two images:
Here is a solution for that. Also check apple documentation. You might have to create document set and install it in Xcode.
Edit: Here is another similar post, How do you populate the Xcode 4 "Option+Click" popover?
There is an open source tool called appledoc which helps with this. You can provide your own documentation in the header files and then run the appledoc script which will (depending on your settings) generate the docsets, install them into Xcode, create a HTML for the documentation as well as rss feeds so that changes to the documentation can be published.

JSLint, when using JS frameworks

I use the Dojo framework, which I load from an url.
How should I deal with the 'dojo' was used before it was defined errors, and the alike?
Yes, my feeling really get hurt, when running code through JSlint.
Perhaps you can put something like
/* globals dojo */
in the beggining of your file to tell JSLint that dojo exists?
I personaly use JSHint (a fork of JSLint that is less nitpicky) instead and one of the preconfigured options is support for Dojo.
Sounds like you need to put Dojo first in your JavaScript. The message suggests that you have an ordering problem.
Don't take it personally. You are not your code. Just make it better, learn something, and don't do it again.
If you scroll all the way down to the bottom there is a "predefined" textbox. Simply put in any of the variables you need into there (comma separated).

TODO tasks list in Flash Builder

Does Flash Builder support tasks list?
I'm testing Flash Builder for PHP, and I can see my // TODO in PHP code but not in AS or MXML.
I found this plugin:
http://www.richinternet.de/blog/index.cfm?entry=911D4B57-0F0D-5A73-AF6F4D4D04099757
but it's very old.
Do you know how can I see my TODO list in AS3 and MXML code with Flash Builder 4.5?
[UPDATE]:
I've installed the plugin from richinternet.de and it works in Flash Builder 4.5 for PHP.
But it's very poor, it only detects the TODOs and FIXMEs if you open the file, it doesn't search all your src for TODOs and FIXMEs.
And also is case insensitive, that's a problem for me, because in spanish "todo" means "everything", so I can't use the word todo in my comments now.
I can't understand how Adobe doesn't include a plugin for this after so many years developing Flash Builder !! they are adding TODO comments when you generate a handler, method, etc !!! I don't know how that can be useful if you don't show it in the tasks!
Get the TODO/FIXME extension for Flash Builder at the following link, and give it a try.
http://www.richinternet.de/blog/index.cfm?entry=911D4B57-0F0D-5A73-AF6F4D4D04099757
Another link at: http://blog.winnemconsulting.com/2011/08/08/fbtoolkit-taskfixmetodo-plugin-for-flex-and-flashbuilder/
How it works: the plugin parses every MXML/AS file when opened and searches comments (both MXML and AS comments) for TODO and FIXME tokens (this search is case insensitive, so it also finds todo). The same action takes place after a file has been saved. If a token is found, a new Task gets generated with its message set to the comment and displayed in the Task View (To open Task View choose Window-->Other Views...-->Basic-->Tasks in Flex Builder 2 standalone and Window-->Show View-->Other-->Basic-->Tasks when running Flex Builder 2 as a plugin in Eclipse). Note: to really delete a Task you have to delete the comment - deleting a Task from the Task View does not kill the comment, so after you save the file the Task will reappear.
For completeness on this question:
I do agree with you on the fact that it is truely amazing and inconceivable that such features do not exist in Flash Builder by default.
There is another alternative, though it's not free (It does have a 30 day trial though)
It is called SourceMate http://www.elementriver.com/sourcemate
The product has loads of other cool features, be sure to check the feature list.
I commented above on the accepted answer, but I'll relist here...
This post is now seriously outdated :(. I would like to offer a different answer... We'll say starting with Flash Builder 4.6.
It's from a great article (from the Adobe Cats) about how to add Task Markers (and Bookmarks) to your Flash Builder Project Files.
You can always search in the solution for "TODO":) And in the results window, press F5 the next time you want to see TODOs.
Best solution is to install the plugins mentioned previously via the software install menu under Help > Install Software.
WARNING - Don't get the SourceMate plugin if you have FB 4.7 - it isn't supported and doesn't look like it will be soon. Check this page for updates: http://support.elementriver.com/discussions/sourcemate

How to stop firefox from downloading and applying CSS via a firefox extension?

Thanks to everyone in advance -
So I have been banging on this issue for quite a while now and have burned through all my options. My current approach to canceling css requests is with nsIRequest.cancel inside of nsIWebProgressListener.onStateChange. This works most of the time, except when things are a little laggy a few will slip through and jump out of the loadgroup before I can get to them. This is obviously a dirty solution.
I have read through the following links to try and get a better idea of how to disable css before a nsIRequest is created...no dice.
https://developer.mozilla.org/en/Document_Loading_-_From_Load_Start_to_Finding_a_Handler
https://developer.mozilla.org/en/The_life_of_an_HTML_HTTP_request
https://developer.mozilla.org/en/Bird's_Eye_View_of_the_Mozilla_Framework
How do I disable css via presentation objects/interfaces? Is this possible? Inside of nsIDocShell there are a few attributes that kind of imply you can disable css via the browsers docshell - allowPlugins, allowJavascript, allowMetaRedirects, allowSubframes, allowImages.
Any suggestions?
Thanks,
Sam
The menu option that disables style sheets uses a function
setStyleDisabled(true)
so you probably can just call this function whenever new browser tab is created. Style sheets are still requested from server, but not applied. This function is not very sophisticated and doesn't mess with nsIRequest, source:
function setStyleDisabled(disabled) {
getMarkupDocumentViewer().authorStyleDisabled = disabled;
}
Digging in Web Developer Toolbar source code I have noticed that their "disable stylesheets" function loops trough all document.styleSheets and sets the disabled property to true, like:
/* if DOM content is loaded */
var sheets = document.styleSheets;
for(var i in sheets){ sheets[i].disabled = true; }
So if the key is to not apply CSS to pages, one of the above solutions should work. But if you really need to stop style sheets from being downloaded from servers, I'm affraid nsIRequest interception is your only option.
Set permissions.default.stylesheet to 2 and voilĂ !
You can actually use the permissions manager to block or allow stylesheets on a host-by-host basis.
Unfortunately there doesn't seem to be a simple flag like allowImages. The bugzilla adding for that is https://bugzilla.mozilla.org/show_bug.cgi?id=340746. You can now vote for it using the new bugzilla voting functionality. You can also add yourself to the CC list to be notified if anyone ever works on it.
A related request is to just give us basic HTML parsing support, which may be what you are trying to do. Unfortunately that isn't supported yet either, but you can vote/track the bugzilla for that at https://bugzilla.mozilla.org/show_bug.cgi?id=102699.
So the only workable solution seems to be some sort of interception as #pawal suggests. Here is a link that talks about the basics of interception to at least get you/us started https://developer.mozilla.org/en/XUL_School/Intercepting_Page_Loads. It lists several options that I list below.
These first few seem to just be at the page/document level so I don't think they help:
Load Events (addEventListener load)
Web Progress Listeners (nsIWebProgressListener) - I tried this approach, it only seems to be called for the page itself, not for content within the page.
Document Loader Service - A global version of nsIWebProgressListener so I think it has the same problem (page level only)
That leaves two others I have not tried yet. They work globally so you would need to filter them to just the browser/pages you care about.
HTTP Observers - Seems like it might work, need to verify it calls back for CSS
Content Policy - Seems like the best option to me since it explicitly is called for CSS, someday I hope to try it :)