Janitors Note: This was originally posted as a sourcecode node (i.e. in the Code Catacombs section). It has been moved to the CUFP section, but that had the side-effect of making the doctext too large to fit. Therefore, the code has been removed — it can be found on the external site (sourceforge) anyway, as the OP notes in the description below.


TkCodex is a specialized code VIEWER that will help you give up sliced bread. I built it for me and my_nihilist while we're learning C, so its been getting tweaked for months now and runs without errors. It works as a single script without configuration, includes a quick reference, and requires no non-standard modules.

The original idea was a read-only GUI app for scanning code when I couldn't remember the exact format of a seldom used command -- the way one might use "grep -r obscurnew()" on a tree of scripts. It also turned out to be great for development and debugging: rather than doing split screens in vim or repeated cat | less scans I now had a specific tool for highlighting all instances of a variable or function call in works-in-progress. I then intended to add a couple of sets of color to distinguish one highlight search from another. TkCodex does that, and it indexes the searches in a side panel, creating a clickable list of instances by line number. It also allows you to quickly add hypertext style notes to a piece of code. These notes and highlights can then be saved in a seperate file, without the possibility of affecting the code itself. You can remove individual or sets of highlight(s) as easily as you create them. There is a "command history" like less and vim, so you don't have to type in a previously done search.

Since TkCodex performs a unique set of functions (as far as I know), it is not based on any existing GUI interface or concept. Also, it uses key macros for speed rather than a lot of 2D mouse menus. I didn't try to include syntax highlighting.

Here's two ways to use it:


Monitored in top, TkCodex runs with with a stable residential memory size of 14 Mb.

A complete set of instructions is in the __DATA__ section of the script.

TkCodex is maintained at SourceForge: http://tkcodex.sourceforge.net/
There you may see screenshots and read the complete documentation in html.


In reply to TkCodex: GUI Code Viewer (linux) by halfcountplus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.