Most viewed recipes tagged "komodo"http://code.activestate.com/recipes/tags/komodo/views/2014-07-03T15:18:03-07:00ActiveState Code RecipesPost code to Pastebin.com (JavaScript) 2010-12-06T17:56:41-08:00Nathan Rambeckhttp://code.activestate.com/recipes/users/4171896/http://code.activestate.com/recipes/577489-post-code-to-pastebincom/ <p style="color: grey"> JavaScript recipe 577489 by <a href="/recipes/users/4171896/">Nathan Rambeck</a> (<a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/pastebin/">pastebin</a>). </p> <p>This is an updated version of another recipe (#577170) to post selected text to <a href="http://pastebin.com" rel="nofollow">pastebin.com</a>. This version uses the latest API. You'll want to change the following variables to your preferences: email, nick, expiry.</p> Komodo JS macro: example chess match (JavaScript) 2012-10-24T16:59:51-07:00Todd Whitemanhttp://code.activestate.com/recipes/users/2666241/http://code.activestate.com/recipes/578304-komodo-js-macro-example-chess-match/ <p style="color: grey"> JavaScript recipe 578304 by <a href="/recipes/users/2666241/">Todd Whiteman</a> (<a href="/recipes/tags/chess/">chess</a>, <a href="/recipes/tags/editor/">editor</a>, <a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/macro/">macro</a>). </p> <p>This is an example macro that will play a specific chess game (Deep Blue v's Garry Kasparov) inside the Komodo editor.</p> Komodo 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> Komodo Macro - Copy to clipboard code selection in HTML format (JavaScript) 2010-04-14T07:17:59-07:00Davide Ficanohttp://code.activestate.com/recipes/users/4166571/http://code.activestate.com/recipes/577193-komodo-macro-copy-to-clipboard-code-selection-in-h/ <p style="color: grey"> JavaScript recipe 577193 by <a href="/recipes/users/4166571/">Davide Ficano</a> (<a href="/recipes/tags/clipboard/">clipboard</a>, <a href="/recipes/tags/html/">html</a>, <a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/macro/">macro</a>). </p> <p>This macro makes easy to paste on documents (MS Office, Open Office, iWorks Pages) code snippets with syntax highlight and/or line numbers.</p> <p>This macro copies the selected code text or whole document if no selection is present on clipboard in HTML format.</p> <p>On OSX you need at least Komodo 6 because previous versions don't support data flavors</p> Komodo JS Macro: Execute JavaScript (JavaScript) 2012-05-07T13:21:30-07:00Patrick Clokehttp://code.activestate.com/recipes/users/4180275/http://code.activestate.com/recipes/578120-komodo-js-macro-execute-javascript/ <p style="color: grey"> JavaScript recipe 578120 by <a href="/recipes/users/4180275/">Patrick Cloke</a> (<a href="/recipes/tags/debug/">debug</a>, <a href="/recipes/tags/debugging/">debugging</a>, <a href="/recipes/tags/editor/">editor</a>, <a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/macro/">macro</a>). </p> <p>Executes a JavaScript file (or the selected text) and display the results in the command output window.</p> Komodo Python Macro - select the current word under the cursor (Python) 2010-01-14T12:30:45-08:00Todd Whitemanhttp://code.activestate.com/recipes/users/2666241/http://code.activestate.com/recipes/577006-komodo-python-macro-select-the-current-word-under-/ <p style="color: grey"> Python recipe 577006 by <a href="/recipes/users/2666241/">Todd Whiteman</a> (<a href="/recipes/tags/cursor/">cursor</a>, <a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/macro/">macro</a>, <a href="/recipes/tags/toddw/">toddw</a>, <a href="/recipes/tags/word/">word</a>). Revision 6. </p> <p>A <a href="http://www.activestate.com/komodo">Komodo</a> Python macro that can be used to select the current word under the cursor position.</p> <p>JavaScript version here: <a href="http://code.activestate.com/recipes/577007/">Recipe 577007</a>.</p> Komodo JS Macro - show custom code completions (JavaScript) 2010-01-18T13:28:16-08:00Todd Whitemanhttp://code.activestate.com/recipes/users/2666241/http://code.activestate.com/recipes/577012-komodo-js-macro-show-custom-code-completions/ <p style="color: grey"> JavaScript recipe 577012 by <a href="/recipes/users/2666241/">Todd Whiteman</a> (<a href="/recipes/tags/code/">code</a>, <a href="/recipes/tags/codeintel/">codeintel</a>, <a href="/recipes/tags/completions/">completions</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/scintilla/">scintilla</a>, <a href="/recipes/tags/toddw/">toddw</a>). </p> <p>A <a href="http://www.activestate.com/komodo">Komodo</a> JavaScript macro that can be used to display a custom completion pop-up.</p> <p><img src="http://community.activestate.com/files/images/custom_completions.png" alt="Completions image" /></p> Macro to Quick find (ctrl+f3) on double click (JavaScript) 2011-07-22T07:46:26-07:00Adamhttp://code.activestate.com/recipes/users/4173315/http://code.activestate.com/recipes/577801-macro-to-quick-find-ctrlf3-on-double-click/ <p style="color: grey"> JavaScript recipe 577801 by <a href="/recipes/users/4173315/">Adam</a> (<a href="/recipes/tags/editor/">editor</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/scintilla/">scintilla</a>). Revision 3. </p> <p>This does a search for the selected word when you double click it. Functionality similar to Notepad++. Faster that ctrl-f3.</p> Komodo JS Macro - use vertical editor tabs positioned to the right (JavaScript) 2010-09-10T02:53:33-07:00Todd Whitemanhttp://code.activestate.com/recipes/users/2666241/http://code.activestate.com/recipes/577386-komodo-js-macro-use-vertical-editor-tabs-positione/ <p style="color: grey"> JavaScript recipe 577386 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/layout/">layout</a>, <a href="/recipes/tags/macro/">macro</a>, <a href="/recipes/tags/tab/">tab</a>). </p> <p>A <a href="http://www.activestate.com/komodo-ide">Komodo</a> JavaScript macro that can be used to position the editor tabs on the right side and shown vertically.</p> <p>Additional layouts (left, right, up, down, vertical, horizontal) can be made with different combinations, see here for the Mozilla tabbox positioning documentation: <a href="https://developer.mozilla.org/en/XUL_Tutorial/Tabboxes#Position_of_the_tabs" rel="nofollow">https://developer.mozilla.org/en/XUL_Tutorial/Tabboxes#Position_of_the_tabs</a></p> Komodo JS Macro - select the current word under the cursor (JavaScript) 2010-01-14T12:30:17-08:00Todd Whitemanhttp://code.activestate.com/recipes/users/2666241/http://code.activestate.com/recipes/577007-komodo-js-macro-select-the-current-word-under-the-/ <p style="color: grey"> JavaScript recipe 577007 by <a href="/recipes/users/2666241/">Todd Whiteman</a> (<a href="/recipes/tags/cursor/">cursor</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/toddw/">toddw</a>, <a href="/recipes/tags/word/">word</a>). </p> <p>A <a href="http://www.activestate.com/komodo">Komodo</a> JavaScript macro that can be used to select the current word under the cursor position.</p> <p>Python version here: <a href="http://code.activestate.com/recipes/577006/">Recipe 577006</a>. </p> Komodo JavaScript Macro - wrap the current word under the cursor (JavaScript) 2011-02-02T23:28:37-08:00Todd Whitemanhttp://code.activestate.com/recipes/users/2666241/http://code.activestate.com/recipes/577561-komodo-javascript-macro-wrap-the-current-word-unde/ <p style="color: grey"> JavaScript recipe 577561 by <a href="/recipes/users/2666241/">Todd Whiteman</a> (<a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/macro/">macro</a>, <a href="/recipes/tags/text/">text</a>, <a href="/recipes/tags/toddw/">toddw</a>, <a href="/recipes/tags/wrap/">wrap</a>). </p> <p>A <a href="http://www.activestate.com/komodo">Komodo</a> JavaScript macro that can be used to wrap the current word under the cursor position (or current selection) with arbitrary text.</p> <p>For example, if I'm editing a HTML file and have the selected text "This is my heading", I can quickly use this macro to wrap this text into "&lt;h1&gt;This is my heading&lt;/h1&gt;".</p> Komodo JS Macro - show svn blame for the current editor line (JavaScript) 2013-05-02T22:28:50-07:00Todd Whitemanhttp://code.activestate.com/recipes/users/2666241/http://code.activestate.com/recipes/577013-komodo-js-macro-show-svn-blame-for-the-current-edi/ <p style="color: grey"> JavaScript recipe 577013 by <a href="/recipes/users/2666241/">Todd Whiteman</a> (<a href="/recipes/tags/blame/">blame</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/scc/">scc</a>, <a href="/recipes/tags/subversion/">subversion</a>, <a href="/recipes/tags/svn/">svn</a>, <a href="/recipes/tags/toddw/">toddw</a>). Revision 4. </p> <p>A <a href="http://www.activestate.com/komodo">Komodo</a> JavaScript macro that can show the SCC repository information for who last changed the current line in the Komodo editor - see the screenshot below.</p> <p><img src="http://community.activestate.com/files/images/svn_blame.png" alt="svn blame image" /></p> Get the Name of the Current Method (JavaScript) 2011-01-03T20:49:58-08:00Eric Promislowhttp://code.activestate.com/recipes/users/4166930/http://code.activestate.com/recipes/577532-get-the-name-of-the-current-method/ <p style="color: grey"> JavaScript recipe 577532 by <a href="/recipes/users/4166930/">Eric Promislow</a> (<a href="/recipes/tags/codeintel/">codeintel</a>, <a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/sections/">sections</a>). </p> <p>Here's a snippet for Komodo JavaScript macros that gives the name of the current method</p> Komodo JS Macro - Copy all "Find Results 1" data into a new editor window (JavaScript) 2014-07-03T15:18:03-07:00Dave Waldhttp://code.activestate.com/recipes/users/4181625/http://code.activestate.com/recipes/578100-komodo-js-macro-copy-all-find-results-1-data-into-/ <p style="color: grey"> JavaScript recipe 578100 by <a href="/recipes/users/4181625/">Dave Wald</a> (<a href="/recipes/tags/findresults/">findresults</a>, <a href="/recipes/tags/javascript/">javascript</a>, <a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/macro/">macro</a>). Revision 5. </p> <p>Gets the Find Results Manager for the "Find Results 1" tab, if it exists. If the tab has rows in it, then copies out all the data from each row and adds it to an output buffer. Creates a new editor view (or optionally reuses the existing one) and appends the output buffer to it. Note: Be sure to see Bruno's update below, until I get it merged in. ;)</p> Komodo JS Macro - move current line down one (JavaScript) 2010-03-10T12:25:06-08:00Eric Promislowhttp://code.activestate.com/recipes/users/4166930/http://code.activestate.com/recipes/577101-komodo-js-macro-move-current-line-down-one/ <p style="color: grey"> JavaScript recipe 577101 by <a href="/recipes/users/4166930/">Eric Promislow</a> (<a href="/recipes/tags/javascript/">javascript</a>, <a href="/recipes/tags/komodo/">komodo</a>). </p> <p>This Komodo macro moves the line containing the caret (cursor) down one line, and then puts the caret at the start of that line in its new position. Put the macro in your toolbox, and bind it to Ctrl-Shift-DownpArrow (unused in the default Komodo keybinding set) to get the same functionality as in some other popular editors).</p> A Komodo macro for duplicating the current file (Komodo 5 only!) (JavaScript) 2011-02-03T23:45:02-08:00Eric Promislowhttp://code.activestate.com/recipes/users/4166930/http://code.activestate.com/recipes/577085-a-komodo-macro-for-duplicating-the-current-file-ko/ <p style="color: grey"> JavaScript recipe 577085 by <a href="/recipes/users/4166930/">Eric Promislow</a> (<a href="/recipes/tags/javascript/">javascript</a>, <a href="/recipes/tags/komodo/">komodo</a>). </p> <p>Komodo projects look like file managers, but don't always offer the same functionality directly. Here's a macro that makes a copy of the current selected file in a project. To use it, create a new macro in the Komodo toolbox, copy this code, paste it in the macro, and save it. Then you can select a file, double-click the macro icon (or assign it to a keybinding), and Komodo will create a copy of the file called "Copy of &lt;basename&gt;.&lt;extension&gt;".</p> Komodo JS Macro - increase the number of code completion items shown (JavaScript) 2012-03-15T23:20:25-07:00Todd Whitemanhttp://code.activestate.com/recipes/users/2666241/http://code.activestate.com/recipes/577163-komodo-js-macro-increase-the-number-of-code-comple/ <p style="color: grey"> JavaScript recipe 577163 by <a href="/recipes/users/2666241/">Todd Whiteman</a> (<a href="/recipes/tags/codeintel/">codeintel</a>, <a href="/recipes/tags/completions/">completions</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/toddw/">toddw</a>). Revision 2. </p> <p>A <a href="http://www.activestate.com/komodo">Komodo</a> JavaScript macro that can be used to set the number of code completion items shown in the list.</p> <p>If you set the macro to Trigger on the Komodo "After file open" event - then this setting will be always be applied to every file code completion list.</p> Komodo Macro: Show all Bookmarks (JavaScript) 2013-04-09T16:45:53-07:00Troy Topnikhttp://code.activestate.com/recipes/users/4165698/http://code.activestate.com/recipes/577272-komodo-macro-show-all-bookmarks/ <p style="color: grey"> JavaScript recipe 577272 by <a href="/recipes/users/4165698/">Troy Topnik</a> (<a href="/recipes/tags/bookmarks/">bookmarks</a>, <a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/macro/">macro</a>). Revision 5. </p> <p>Komodo JavaScript macro that shows a click-able list of all bookmarks in the Command Output tab.</p> Implementing Vertical Editing in Komodo 6 (JavaScript) 2010-09-29T19:09:35-07:00Eric Promislowhttp://code.activestate.com/recipes/users/4166930/http://code.activestate.com/recipes/577406-implementing-vertical-editing-in-komodo-6/ <p style="color: grey"> JavaScript recipe 577406 by <a href="/recipes/users/4166930/">Eric Promislow</a> (<a href="/recipes/tags/columns/">columns</a>, <a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/verticalediting/">verticalediting</a>). Revision 4. </p> <p>When editing a group of similar lines, it's very convenient to be able to press down-arrow and move to the same starting column position on the next line. (See an example at <a href="http://community.activestate.com/forum/vertical-editing" rel="nofollow">http://community.activestate.com/forum/vertical-editing</a> ).</p> <p>This code is for a Komodo 6 macro -- possibly the only tweak necessary to make it work on Komodo 5 is by commenting out the "macro.save()" code, but I haven't tested it. The discussion below will talk about how to use it. </p> Komodo JS Macro - Submit text selection to pastebin.mozilla.com service (JavaScript) 2010-03-31T06:34:21-07:00Davide Ficanohttp://code.activestate.com/recipes/users/4166571/http://code.activestate.com/recipes/577170-komodo-js-macro-submit-text-selection-to-pastebinm/ <p style="color: grey"> JavaScript recipe 577170 by <a href="/recipes/users/4166571/">Davide Ficano</a> (<a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/macro/">macro</a>, <a href="/recipes/tags/pastebin/">pastebin</a>). </p> <p>Submit the select text to pastebin and copy to clipboard the URL returned from service.</p> <p>The programming language is auto-detected.</p> <p>The statusbar will show the message about submission status.</p> <p><strong>Setting username</strong></p> <p>By default the post is submitted with 'anonymous' user, to change it set the <strong>nick</strong> variable to a different value </p>