Annotation of 43BSDReno/share/doc/usd/17.jove/jove.3, revision 1.1

1.1     ! root        1: .\"    @(#)jove.3      6.1 (Berkeley) 5/30/86
        !             2: .\"
        !             3: .NH 1
        !             4: Directory Handling
        !             5: .XS \n(PN
        !             6: \*(SN Directory Handling
        !             7: .XE
        !             8: .LP
        !             9: To save having to use absolute pathnames when you want to edit a nearby file
        !            10: \s-2JOVE\s0 allows you to move around the
        !            11: .UX
        !            12: filesystem just as the c-shell does.
        !            13: These commands are:
        !            14: .IP "cd dir" 15n
        !            15: Change to the specified directory.
        !            16: .IP "pushd [dir]"
        !            17: Like \fIcd\fP, but save the old directory on the directory stack.
        !            18: With no directory argument, simply exchange the top two directories
        !            19: on the stack and \fIcd\fP to the new top.
        !            20: .IP "popd"
        !            21: Take the current directory off the stack and \fIcd\fP to the directory now
        !            22: at the top.
        !            23: .IP "dirs"
        !            24: Display the contents of the directory stack.
        !            25: .LP
        !            26: The names and behavior of these commands were chosen to mimic those in the c-shell.
        !            27: .NH 1
        !            28: Editing C Programs
        !            29: .XS \n(PN
        !            30: \*(SN Editing C Programs
        !            31: .XE
        !            32: .LP
        !            33: This section details the support provided by \s-2JOVE\s0
        !            34: for working on C programs.
        !            35: .NH 2
        !            36: Indentation Commands
        !            37: .XS \n(PN 5n
        !            38: \*(SN Indentation Commands
        !            39: .XE
        !            40: .LP
        !            41: To save having to lay out C programs "by hand", \s-2JOVE\s0
        !            42: has an idea of the correct indentation of a line,
        !            43: based on the surrounding context.
        !            44: When you are in C Mode, \s-2JOVE\s0 treats tabs specially \(em
        !            45: typing a tab at the beginning of a new line means "indent to
        !            46: the right place".
        !            47: Closing braces are also handled specially, and are indented
        !            48: to match the corresponding open brace.
        !            49: .NH 2
        !            50: Parenthesis and Brace Matching
        !            51: .XS \n(PN 5n
        !            52: \*(SN Parenthesis and Brace Matching
        !            53: .XE
        !            54: .LP
        !            55: To check that parentheses and braces match the way you think they do,
        !            56: turn on \fIShow Match\fP mode (ESC X show-match-mode).  Then, whenever
        !            57: you type a close brace or parenthesis, the cursor moves momentarily to
        !            58: the matching opener, if it's currently visible.  If it's not visible,
        !            59: \s-2JOVE\s0 displays the line containing the matching opener on the message
        !            60: line.
        !            61: .NH 2
        !            62: C Tags
        !            63: .XS \n(PN 5n
        !            64: \*(SN C Tags
        !            65: .XE
        !            66: .LP
        !            67: Often when you are editing a C program,
        !            68: especially someone else's code,
        !            69: you see a function call and wonder what that function does.
        !            70: You then search for the function within the current file and if you're
        !            71: lucky find
        !            72: the definition, finally returning to the original spot when you are done.
        !            73: However, if are unlucky, the function turns out to be external
        !            74: (defined in another file) and
        !            75: you have to suspend the edit,
        !            76: \fIgrep\fP for the function name in every .c that might contain it,
        !            77: and finally visit the appropriate file.
        !            78: .LP
        !            79: To avoid this diversion or the need to remember which
        !            80: function is defined in which file,
        !            81: Berkeley 
        !            82: .UX
        !            83: has a program called \fIctags(1)\fP, which
        !            84: takes a set of source files and looks for function
        !            85: definitions, producing a file called \fItags\fP as its output.
        !            86: .LP
        !            87: \s-2JOVE\s0 has a command called C-X T (\fIfind-tag\fP)
        !            88: that prompts you for the name of a function (a \fItag\fP), looks up
        !            89: the tag reference in the previously constructed tags file, 
        !            90: then visits the file containing that tag in a new buffer,
        !            91: with point positioned at the definition of the function.
        !            92: There is another version of this command, namely \fIfind-tag-at-point\fP,
        !            93: that uses the identifier at 
        !            94: .I point.
        !            95: .LP
        !            96: So, when you've added new functions to a module, or moved some old
        !            97: ones around, run the \fIctags\fP program to regenerate the \fItags\fP file.
        !            98: \s-2JOVE\s0 looks in the file specified in the \fItag-file\fP variable.  The
        !            99: default is "./tags", that is, the tag file in the current directory.  If you
        !           100: wish to use an alternate tag file, you use C-U\ C-X\ T, and \s-2JOVE\s0 will
        !           101: prompt for a file name.  If you find yourself specifying the same file again
        !           102: and again, you can set \fItag-file\fP to that file, and run
        !           103: \fIfind-tag\fP with no numeric argument.
        !           104: .LP
        !           105: To begin an editing session looking for a particular tag, use
        !           106: the \fI\-t tag\fP command line option to \s-2JOVE\s0.
        !           107: For example, say you wanted to look at the file containing the tag
        !           108: \fISkipChar\fP, you would invoke \s-2JOVE\s0 as:
        !           109: .DS I
        !           110: .I
        !           111: % jove \-t SkipChar
        !           112: .R
        !           113: .DE
        !           114: .NH 2
        !           115: Compiling Your Program
        !           116: .XS \n(PN 5n
        !           117: \*(SN Compiling Your Program
        !           118: .XE
        !           119: .LP
        !           120: You've typed in a program or altered an existing one and now you
        !           121: want to run it through the compiler to check for errors.
        !           122: To save having to suspend the edit,
        !           123: run the compiler,
        !           124: scribble down error messages, and then resume the edit,
        !           125: \s-2JOVE\s0 allows you to compile your code while in the editor.
        !           126: This is done with the C-X C-E (\fIcompile-it\fP) command.
        !           127: If you run \fIcompile-it\fP with no argument
        !           128: it runs the
        !           129: .UX
        !           130: \fImake\fP
        !           131: program into a buffer;
        !           132: If you need a special command or want to pass arguments to \fImake\fP,
        !           133: run \fIcompile-it\fP with any argument (C-U is good enough) and you
        !           134: will be prompted for the command to execute.
        !           135: .LP
        !           136: If any error messages are produced, they are treated specially by \s-2JOVE\s0.
        !           137: That treatment is the subject of the next section.
        !           138: .NH 2
        !           139: Error Message Parsing and Spelling Checking
        !           140: .XS \n(PN
        !           141: \*(SN Error Message Parsing
        !           142: \*(SN Spelling Checking
        !           143: .XE
        !           144: .LP
        !           145: \s-2JOVE\s0 knows how to interpret the error messages from many
        !           146: .UX
        !           147: commands;
        !           148: In particular,
        !           149: the messages from \fIcc\fP,
        !           150: \fIgrep\fP and \fIlint\fP can be understood.
        !           151: After running the \fIcompile-it\fP command,
        !           152: the \fIparse-errors\fP command is automatically executed,
        !           153: and any errors found are displayed in a new buffer.
        !           154: The files whose names are found in parsing the error messages are each
        !           155: brought into \s-2JOVE\s0 buffers and the point is positioned at the first error
        !           156: in the first file.
        !           157: The commands \fIcurrent-error\fP, C-X C-N (\fInext-error\fP), and
        !           158: C-X C-P (\fIprevious-error\fP)
        !           159: can be used to traverse the list of errors.
        !           160: .LP
        !           161: If you already have a file called
        !           162: \fIerrs\fP containing, say, c compiler messages then you can get \s-2JOVE\s0 to interpret the messages by
        !           163: invoking it as:
        !           164: .DS I
        !           165: .I
        !           166: % jove \-p errs
        !           167: .R
        !           168: .DE
        !           169: .LP
        !           170: \s-2JOVE\s0 has a special mechanism for checking the the spelling of a document;
        !           171: It runs the
        !           172: .UX
        !           173: spell program into a buffer.
        !           174: You then delete from this buffer all those words that are not spelling
        !           175: errors and then \s-2JOVE\s0 runs the \fIparse-spelling-errors\fP command to
        !           176: yield a list of errors just as in the last section.
        !           177: .NH 1
        !           178: Simple Customization
        !           179: .XS \n(PN
        !           180: \*(SN Simple Customization
        !           181: .XE
        !           182: .LP
        !           183: .NH 2
        !           184: Major Modes
        !           185: .XS \n(PN 5n
        !           186: \*(SN Major Modes
        !           187: .XE
        !           188: .LP
        !           189: To help with editing particular types of file, say a paper or a C program,
        !           190: \s-2JOVE\s0 has several \fImajor modes\fP.
        !           191: These are as follows:
        !           192: .NH 3
        !           193: Text mode
        !           194: .XS \n(PN 10n
        !           195: \*(SN Text mode
        !           196: .XE
        !           197: .LP
        !           198: This is the default major mode.  Nothing special is done.
        !           199: .NH 3
        !           200: C mode
        !           201: .XS \n(PN 10n
        !           202: \*(SN C mode
        !           203: .XE
        !           204: .LP
        !           205: This mode affects the behavior of the tab and parentheses characters.
        !           206: Instead of just inserting the tab, \s-2JOVE\s0 determines
        !           207: where the text "ought" to line up for the C language and tabs to that position
        !           208: instead.  The same thing happens with the close brace and close parenthesis;
        !           209: they are tabbed to the "right" place and then inserted.
        !           210: Using the \fIauto-execute-command\fP command, you can make \s-2JOVE\s0 enter
        !           211: \fIC Mode\fP whenever you edit a file whose name ends in \fI.c\fP.
        !           212: .NH 3
        !           213: Lisp mode
        !           214: .XS \n(PN 10n
        !           215: \*(SN Lisp mode
        !           216: .XE
        !           217: .LP
        !           218: This mode is analogous to \fIC Mode\fP,
        !           219: but performs the indentation needed to lay out Lisp programs properly.
        !           220: Note also the \fIgrind-s-expr\fP command that prettyprints an
        !           221: \fIs-expression\fP and the \fIkill-mode-expression\fP command.
        !           222: .NH 2
        !           223: Minor Modes
        !           224: .XS \n(PN 5n
        !           225: \*(SN Minor Modes
        !           226: .XE
        !           227: .LP
        !           228: In addition to the major modes,
        !           229: \s-2JOVE\s0 has a set of minor modes.
        !           230: These are as follows:
        !           231: .NH 3
        !           232: Auto Indent
        !           233: .XS \n(PN 10n
        !           234: \*(SN Auto Indent
        !           235: .XE
        !           236: .LP
        !           237: In this mode,
        !           238: \s-2JOVE\s0 indents each line the same way as that above it.  That is,
        !           239: the Return key in this mode acts as the Linefeed key ordinarily does.
        !           240: .NH 3
        !           241: Show Match
        !           242: .XS \n(PN 10n
        !           243: \*(SN Show Match
        !           244: .XE
        !           245: .LP
        !           246: Move the cursor momentarily to the matching opening parenthesis when a closing
        !           247: parenthesis is typed.
        !           248: .NH 3
        !           249: Auto Fill
        !           250: .XS \n(PN 10n
        !           251: \*(SN Auto Fill
        !           252: .XE
        !           253: .LP
        !           254: In \fIAuto Fill\fP mode,
        !           255: a newline is automatically inserted when the line length
        !           256: exceeds the right margin.
        !           257: This way,
        !           258: you can type a whole paper without having to use the Return key.
        !           259: .NH 3
        !           260: Over Write
        !           261: .XS \n(PN 10n
        !           262: \*(SN Over Write
        !           263: .XE
        !           264: .LP
        !           265: In this mode,
        !           266: any text typed in will replace the previous contents.
        !           267: (The default is for new text to be inserted and "push" the old along.)
        !           268: This is useful for editing an already-formatted diagram in which you
        !           269: want to change some things without moving other things around on the
        !           270: screen.
        !           271: .NH 3
        !           272: Word Abbrev
        !           273: .XS \n(PN 10n
        !           274: \*(SN Word Abbrev
        !           275: .XE
        !           276: .LP
        !           277: In this mode, every word you type is compared to a list of word
        !           278: abbreviations; whenever you type an abbreviation, it is replaced
        !           279: by the text that it abbreviates.
        !           280: This can save typing if a particular word or phrase must be entered
        !           281: many times.
        !           282: The abbreviations and their expansions are held in a file that looks like:
        !           283: .DS I
        !           284: abbrev:phrase
        !           285: .DE
        !           286: This file can be set up in your \fI~/.\|joverc\fP with the \fIread-word-abbrev-file\fP command.
        !           287: Then, whenever you are editing a buffer in \fIWord Abbrev\fP mode,
        !           288: \s-2JOVE\s0 checks for the abbreviations you've given.
        !           289: See also the commands
        !           290: \fIread-word-abbrev-file\fP,
        !           291: \fIwrite-word-abbrev-file\fP,
        !           292: \fIedit-word-abbrevs\fP,
        !           293: \fIdefine-global-word-abbrev\fP,
        !           294: \fIdefine-mode-word-abbrev\fP,
        !           295: and \fIbind-macro-to-word-abbrev\fP,
        !           296: and the variable \fIauto-case-abbrev\fP.
        !           297: .NH 2
        !           298: Variables
        !           299: .XS \n(PN 5n
        !           300: \*(SN Variables
        !           301: .XE
        !           302: .LP
        !           303: \s-2JOVE\s0 can be tailored to suit your needs by changing the
        !           304: values of variables.
        !           305: A \s-2JOVE\s0 variable can be given a value with the \fIset\fP command,
        !           306: and its value displayed with the \fIprint\fP command.
        !           307: .LP
        !           308: The variables \s-2JOVE\s0 understands are listed along with the commands
        !           309: in the alphabetical list at the end of this document.
        !           310: .NH 2
        !           311: Key Re-binding
        !           312: .XS \n(PN 5n
        !           313: \*(SN Key Re-binding
        !           314: .XE
        !           315: .LP
        !           316: Many of the commands built into \s-2JOVE\s0 are not bound to
        !           317: specific keys.
        !           318: The command handler in
        !           319: \s-2JOVE\s0 is used to invoke these commands and is activated
        !           320: by the \fIexecute-extended-command\fP command (ESC X).
        !           321: When the name of a command typed in is unambiguous,
        !           322: that command will be executed.
        !           323: Since it is very slow to have
        !           324: to type in the name of each command every time it is needed,
        !           325: \s-2JOVE\s0 makes it possible to \fIbind\fP commands to keys.
        !           326: When a command is
        !           327: \fIbound\fP to a key any future hits on that key will invoke that command.
        !           328: All the printing characters are initially bound to the
        !           329: command \fIself-insert\fP.
        !           330: Thus, typing any printing character causes it to be inserted into the text.
        !           331: Any of the existing commands can be bound to any key.
        !           332: (A \fIkey\fP may actually be a \fIcontrol character\fP
        !           333: or an \fIescape sequence\fP as explained previously under
        !           334: \fICommand Input Conventions\fP).
        !           335: .LP
        !           336: Since there are more commands than there are keys,
        !           337: two keys are treated as \fIprefix\fP commands.
        !           338: When a key bound to one of the prefix commands is typed,
        !           339: the next character
        !           340: typed is interpreted on the basis that it was preceded by one of the
        !           341: prefix keys.
        !           342: Initially ^X and ESC are the prefix keys and
        !           343: many of the built in commands are initially bound to these "two stroke" keys.
        !           344: (For historical reasons, the Escape key is often referred to as "Meta").
        !           345: .NH 2
        !           346: Keyboard Macros
        !           347: .XS \n(PN 5n
        !           348: \*(SN Keyboard Macros
        !           349: .XE
        !           350: .LP
        !           351: Although \s-2JOVE\s0 has many powerful commands,
        !           352: you often find that you have a task that no individual command can do.
        !           353: \s-2JOVE\s0 allows you to define your own commands from sequences
        !           354: of existing ones "by example";
        !           355: Such a sequence is termed a \fImacro\fP.
        !           356: The procedure is as follows:
        !           357: First you type the \fIstart-remembering\fP command,
        !           358: usually bound to C-X (.
        !           359: Next you "perform" the commands which as they are being executed are
        !           360: also 
        !           361: remembered, which will constitute the body of the macro.
        !           362: Then you give the \fIstop-remembering\fP command, usually bound to
        !           363: C-X ).
        !           364: You now have a \fIkeyboard macro\fP.
        !           365: To run this command sequence again,
        !           366: use the command \fIexecute-keyboard-macro\fP, usually bound to
        !           367: C-X E.
        !           368: You may find this bothersome to type and re-type,
        !           369: so there is a way to bind the macro to a key.
        !           370: First,
        !           371: you must give the keyboard macro a name using the
        !           372: \fIname-keyboard-macro\fP command.
        !           373: Then the binding is made with the \fIbind-macro-to-key\fP command.
        !           374: We're still not finished because all this hard work will be lost
        !           375: if you leave \s-2JOVE\s0.
        !           376: What you do is to save your macros into a file
        !           377: with the \fIwrite-macros-to-file\fP command.
        !           378: There is a corresponding \fIread-macros-from-file\fP command to retrieve
        !           379: your macros in the next editing session.
        !           380: .NH 2
        !           381: Initialization Files
        !           382: .XS \n(PN 5n
        !           383: \*(SN Initialization Files
        !           384: .XE
        !           385: .LP
        !           386: Users will likely want to modify the default key bindings to their liking.
        !           387: Since it would be quite annoying to have to set up the bindings
        !           388: each time \s-2JOVE\s0 is started up,
        !           389: \s-2JOVE\s0 has the ability to read in a "startup" file.
        !           390: Whenever \s-2JOVE\s0 is started,
        !           391: it reads commands from the file \fI.\|joverc\fP in the user's home directory.
        !           392: These commands are read as
        !           393: if they were typed to the command handler (ESC X) during an edit.
        !           394: There can be only one command per line in the startup file.
        !           395: If there is a file \fI/usr/lib/jove/joverc\fP,
        !           396: then this file will be read before the user's
        !           397: .I .\|joverc
        !           398: file.
        !           399: This can be used to set up a system-wide default startup mode for
        !           400: \s-2JOVE\s0
        !           401: that is tailored to the needs of that system.
        !           402: .LP
        !           403: The \fIsource\fP command can be used to read commands from a specified file
        !           404: at any time during an editing session,
        !           405: even from inside the \fI.\|joverc\fP file.
        !           406: This means that a macro can be used to change the key bindings,
        !           407: e.g., to enter a mode,
        !           408: by reading from a specified file which contains all the necessary bindings.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.