Posts

Showing posts from May, 2009

lab 99 - catching up with inferno-os

NAME lab 99 - catching up with inferno-os NOTES I had fallen way behind in keeping acme-sac code up to date with inferno-os. I tried to correct that this week by merging changes and adding files from inferno-os. I wrote a script, part of this labs files , to check the differences between inferno-os and acme-sac. I'm hoping by using this script I'll stay up to date with inferno-os as changes are made. The script compares sub-trees, such as the limbo source code hierarchy, the C source code, the manual pages, and the /lib directory. It prints out commands to diff the files or copy the file over. % inf inferno synchronization: appl show changed limbo files sys show changed C source files man show changed man pages lib show changed /lib files cmd show changed sh scripts below /dis update refresh file tree info for local and remote adiff adiff selected file with inferno-os equivalent diff diff selected file with inferno-os equiv

lab 98 - acme Ctag

Image
NAME lab 98 - acme Ctag NOTES Ctag is a new client for acme that reads the tags file generated by ctags. In particular I worked with Exuberant Ctags on windows. While working on acme content-assist in lab 94 I thought a next possible step was using ctags for code completion. So in writing this program I wanted to explore using exuberant ctags by doing something easier, that is by providing assistance with code navigation. Exuberant ctags understands many languages, but for the current effort I tried it on Java and Python. For example, I generated tags for the python standard libraries, cd:/Python30 ctags -R --excmd=number --exclude=test Then run the client on the tags file, Ctag /n/D/Python30/tags What you start with is a blank window. In the tagline is a File command. Give it an argument of a filename which it will grep for in the ctags file. File mailbox It will then show all classes and methods within matching files. You can right-click on a method name to open

lab 97 - acme Navigator

Image
NAME lab 97 - acme Navigator NOTES I created a simple directory browser for acme. Called Navigator, it opens directories in the same window. This makes descending deep but unfamiliar directory hierarchies easier because it avoids the proliferation of windows that clutter the desktop. The client understands the command Pin for creating a standard acme directory window for the current directory (to pin the current directory to the desktop). This is an example for a rather simple client for acme. FILES inferno-lab/97

lab 96 - acme color schemes

Image
NAME lab 96 - acme color schemes NOTES The inferno version of acme always contained some code to configure the acme color scheme, but I'm not sure if it always, if ever worked. I modified the code a little in acme-sac to make the color configuration work. And I came up with a few new schemes. The schemes are checked into acme-sac under /acme/color . To use a different scheme add a line like this to your $home/lib/profile run /acme/color/evening Running the "evening" scheme will make acme look like this. The configuration files sets a few environment variables of the following form: acme-fg-text-0='#000000' This sets the foreground text color in the body text to black. It's possible to mix two colors, as for the standard acme background. acme-bg-text-0='#FFFFAA/#FFFFFF' Another simple scheme is "bw" for black and white. There is also a file /acme/color/standard for the default acme color scheme which can be copied tweaked

lab 95 - acme side-by-side diff

Image
NAME lab 95 - acme side-by-side diff NOTES Here's a script I wrote to help do side-by-side diffs in Acme. Run adiff as normal inside acme. And then in the adiff output window type the command NextDiff. Executing this command will step through each diff in the adiff output and highlight the changed region in each file. The script will highlight each line, avoiding the cursor jump to highlighted regions as happens by plumbing or right-clicking on a file pattern. Though the cursor jump will occur the first time the diffed files are opened, for subsequent execution of NextDiff for diffs within the same files the cursor will remain over the NextDiff command and the highlighted regions will change with file scrolling to show at least part of the changed regions. When the files first open you'll still need to manually arrange the files side by side. There is no acme API for window placement. However, the command will save some amount of scrolling, clicking, and mouse moveme