yorick devolpment environment

yorick banner




Global Index


Quick Reference

Yorick Development Environment

Yorick is not a point-and-click program. To use it, you type commands at a terminal; the commands cause yorick programs to execute. Output may consist of things printed in the terminal window, or graphics plotted in separate graphics windows, or files written to disk. You also need a text editor (not a word processor) in order to prepare and save more permanent yorick programs. On the MS Windows and MacIntosh platforms, at least the terminal window and possibly a text editor are built into the yorick binary. On UNIX platforms, including Linux, you can use a standard terminal emulator like xterm, but I strongly recommend running yorick from GNU Emacs. Emacs can serve as both a powerful terminal emulation program and a syntax-aware text editor for managing yorick source code. A good port of GNU Emacs exists for MS Windows. On the MacIntosh, the BBEdit text editor is probably the best choice for editing yorick source code.

The yorick.el emacs package is part of the yorick-1.5 distribution, but it works just as well with earlier versions of yorick. If you have a yorick binary distribution, it may already include yorick.el; try typing M-x yorick in an emacs window, or, if that fails, see if yorick.el is in your Y_SITE directory. The yorick.el package provides both a special mode for editing yorick source code, and a very nice terminal emulator where you can run yorick. Even if you don't like emacs as a text editor, you will probably find the yorick.el terminal emulator nicer than xterm.

Since one of the primary goals of yorick is cross-platform portability, we try to keep the look-and-feel of the yorick development environment as consistent as possible across platforms. This has proven impossible at the level of the text editor, so the text editors built into yorick, or used to edit yorick source code, tend to have little resemblance. However, for the terminal emulators, we try to provide at least the following functions. Here, the keystroke RET means the Return or Enter key, and the prefix C- means holding down the control key. Several of the keys operate slightly differently when you are at the end of the text in the window (where you would normally type into a terminal window), as opposed to elsewhere in the window.

on final line: send the command line to yorick
elsewhere: copy the current line after the final prompt (a form of command recall)
Up arrow
at end of text: recall previous command line
elsewhere: usual cursor up function
Down arrow
at end of text: recall next command line
elsewhere: usual cursor down function
Right arrow
at end of text: recall most recently recalled command line
elsewhere: usual cursor right function
insert a newline (since RET does something else)
kill line back to prompt
kill line forward to end of line
move to beginning of line
kill most recent output from yorick
interrupt yorick
open and position the file and line number mentioned in the yorick error or help message nearest the cursor

The usual text editing commands work anywhere in the terminal window, so you can edit not only the current command line, but previous input to or output from yorick. The command recall mechanism remembers the line most recently recalled: A sequence of Up, Down, or Right arrow keystrokes with nothing else intervening moves through the command history. If the first arrow key in a sequence is the Up arrow, the most recently sent command line is recalled. However, if the first arrow key in a sequence is the Right or Down arrow, the sequence begins with the most recently recalled line or the line after that, respectively. The point of this is that you can hit Up several times to get back to an earlier line. After you've edited and sent this line by hitting RET, you can hit Down to recall the next line in the earlier sequence, so that the key sequence Down RET Down RET Down RET sends a whole series of earlier lines. Interactive yorick sessions benefit greatly from this sort of command recall, since sequences of yorick commands, perhaps with small changes, are often repeated.

LLNL Disclaimers