Comp 2673, Spring 2002
April 15, lecture notes

Reading: No new reading assignment - Make sure you are done with 1-8, 10 and 12 in the Unix book and are done reviewing 6-8 in D&D Some more info on emacs: Commands for movement: arrow keys: up down left right or control keys: C-p C-n C-b C-f (think of these as previous-line, next-line, forward-char, back-char To move faster: Esc-f (forward a word) Esc-b (backward a word) C-a (beginning of line) C-e (end of line) C-v (forward one screen) Esc-v (backward one screen) Esc-< (beginning of file) Esc-> (end of file) Search and replace: C-s - incremental search C-r - incremental search backwards C-s C-s - repeat previous search (if you've moved since the last search) Esc % - query search and replace Deleting text: C-d - delete character <del> - delete character in backwards direction Esc d - delete word Esc <del> - delete word in backwards direction C-k - kill line Editing using regions A marked region lies between a mark that you set and the cursor. C-<space> - set a mark C-w - delete marked region Esc-w - copy region C-y - paste copied region Recovering from errors C-g Cancel the current command C-x u - undo (can be repeated) Move cursor, then C-x u - redo command that has just been undone Esc-x revert-buffer <return> - undo all changes since file last saved Esc 5 C-x u - undo the last 5 commands Cool features Esc 7 - repeat the next command 7 times C-t transpose two characters Esc-t - transpose two words Esc-c - capitalize word Esc-u - make word upper case A cool unix command: The "cal" command prints a calendar for a specific month or a specific year % cal 4 2002 % cal 1962 We'll also spend some time talking about the design of the programming project