Popular recipes tagged "tab"http://code.activestate.com/recipes/tags/tab/2011-08-24T03:14:13-07:00ActiveState Code RecipesBash completed man and info pages generation (Python) 2011-08-24T03:14:13-07:00Josh Dhttp://code.activestate.com/recipes/users/4179060/http://code.activestate.com/recipes/577854-bash-completed-man-and-info-pages-generation/ <p style="color: grey"> Python recipe 577854 by <a href="/recipes/users/4179060/">Josh D</a> (<a href="/recipes/tags/a/">a</a>, <a href="/recipes/tags/all/">all</a>, <a href="/recipes/tags/and/">and</a>, <a href="/recipes/tags/bash/">bash</a>, <a href="/recipes/tags/be/">be</a>, <a href="/recipes/tags/command/">command</a>, <a href="/recipes/tags/completed/">completed</a>, <a href="/recipes/tags/consume/">consume</a>, <a href="/recipes/tags/file/">file</a>, <a href="/recipes/tags/first/">first</a>, <a href="/recipes/tags/generation/">generation</a>, <a href="/recipes/tags/get/">get</a>, <a href="/recipes/tags/in/">in</a>, <a href="/recipes/tags/info/">info</a>, <a href="/recipes/tags/line/">line</a>, <a href="/recipes/tags/man/">man</a>, <a href="/recipes/tags/modify/">modify</a>, <a href="/recipes/tags/must/">must</a>, <a href="/recipes/tags/only/">only</a>, <a href="/recipes/tags/pages/">pages</a>, <a href="/recipes/tags/possibilties/">possibilties</a>, <a href="/recipes/tags/possiblities/">possiblities</a>, <a href="/recipes/tags/py/">py</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/run/">run</a>, <a href="/recipes/tags/script/">script</a>, <a href="/recipes/tags/so/">so</a>, <a href="/recipes/tags/tab/">tab</a>, <a href="/recipes/tags/terminal/">terminal</a>, <a href="/recipes/tags/the/">the</a>, <a href="/recipes/tags/this/">this</a>, <a href="/recipes/tags/to/">to</a>). Revision 6. </p> <p>The script it self is very self explaining - the task is simple. *NIX only unless with cygwin perhaps?</p> <p>To start this open a terminal and strike the "Tab" key to get all possibilities (strike y, and strike the space key alot). Select all then Copy and save in "comms.txt" Modify the file so ONLY the possiblities consume a line; no prompts or extra newlines. (first line must be a command, the last line must be a command)</p> <p>Save the file ("~/Documents/bashing/comms.txt" is my path) then run this script in "~/Documents/bashing/".</p> <p>This generates two (2) files: "bash_help_man.sh", "bash_help_info.sh".</p> <p>Then it runs these files: "bash bash_help_man.sh", "bash bash_help_info.sh".</p> <p>This produces 2 files for every command (every line) in "comms.txt". All manpages are wrote in "mans/", all infopages are wrote in "infos/"</p> <p>There is now alot of files to read and organize; lets separate these by size. Directories are under1kb, under2kb, etc.</p> <p>Once complete do as you wish the files less than 128 kb; these files are COPIED into there new respective home, I repeat COPIED.</p> <p>The files 128 kb and higher ARE NOT copied to anywhere!</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 - force the focus back onto the editor after an alt-tab (JavaScript) 2010-03-29T18:59:03-07:00Todd Whitemanhttp://code.activestate.com/recipes/users/2666241/http://code.activestate.com/recipes/577164-komodo-js-macro-force-the-focus-back-onto-the-edit/ <p style="color: grey"> JavaScript recipe 577164 by <a href="/recipes/users/2666241/">Todd Whiteman</a> (<a href="/recipes/tags/focus/">focus</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/setfocus/">setfocus</a>, <a href="/recipes/tags/tab/">tab</a>, <a href="/recipes/tags/window/">window</a>). </p> <p>A <a href="http://www.activestate.com/komodo">Komodo</a> JavaScript macro that can be used to force the focus back to the Komodo editor after switching between windows (i.e. after using Alt-Tab).</p> <p>This macro only applies to Windows and Mac OS - where there is an application activated notification event available.</p> <p>To use this macro - set the macro to trigger on the "On startup" event.</p> sane tab completion in pdb (Python) 2009-07-06T04:35:33-07:00Stephen Emsliehttp://code.activestate.com/recipes/users/4004606/http://code.activestate.com/recipes/498182-sane-tab-completion-in-pdb/ <p style="color: grey"> Python recipe 498182 by <a href="/recipes/users/4004606/">Stephen Emslie</a> (<a href="/recipes/tags/complete/">complete</a>, <a href="/recipes/tags/debugging/">debugging</a>, <a href="/recipes/tags/pdb/">pdb</a>, <a href="/recipes/tags/tab/">tab</a>). Revision 6. </p> <p>I make frequent use of python's built-in debugger, but one obvious feature seems to be missing - the bash-like tab completion that you can add to the interpreter. Fortunately pdb's interactive prompt is an instance of Cmd, so we can write our own completion function.</p> <p>Note: this uses rlcompleter, which isn't available on windows</p> <p>Edit (6 Jul 2009): import rlcompleter early and force output to stdout to ensure monkeypatch sticks Edit: updated to handle changes in local scope Edit: Fixed start via 'python -m pdb ...'. Check the comments for details.</p>