Popular JavaScript recipes tagged "relative"http://code.activestate.com/recipes/langs/javascript/tags/relative/2012-02-24T00:23:09-08:00ActiveState Code RecipesKomodo JS Macro - insert a relative path from the current editor file (JavaScript)
2012-02-24T00:23:09-08:00Todd Whitemanhttp://code.activestate.com/recipes/users/2666241/http://code.activestate.com/recipes/577306-komodo-js-macro-insert-a-relative-path-from-the-cu/
<p style="color: grey">
JavaScript
recipe 577306
by <a href="/recipes/users/2666241/">Todd Whiteman</a>
(<a href="/recipes/tags/javascript/">javascript</a>, <a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/macro/">macro</a>, <a href="/recipes/tags/path/">path</a>, <a href="/recipes/tags/relative/">relative</a>).
Revision 3.
</p>
<p>A <a href="http://www.activestate.com/komodo">Komodo</a> JavaScript macro that can be used to generate a relative path from the current editor file location, which works great for HTML when linking to relative style sheets, images, etc...</p>
<p>Upon execution of this macro, you will be prompted to browse and select the target file, then upon selecting the target path, the relative path location will be inserted into the editor at the current position.</p>
<p>To best use this macro - assign a custom key-binding to the macro and then trigger the macro at will.</p>