INTRODUCTION TO THE crisp EDITOR: 1. GETTING THE RIGHT ENVIRONMENT: export DDMF_HOST=ext1 export DISPLAY=my_terminal export PATH=$PATH:/ext1/crisp/bin.hpux Advice: many interesting features from the crisp editor are available through the "Options" menu. If you copy the .Crisp directory from my user: cp -r ~piriou/.Crisp $HOME/.Crisp, you will get instantaneously the following features: - Colorization: comments, key words, numeric constants will appear in a different color on screen, this effect beeing file suffix dependent: [.F .f .h] fortran colorizing, [.c .c++] c colorizing, [.tex] tex colorizing, [.ps .eps .epsi] postscript colorizing, [.sh .csh .ksh] shell colorizing, etc...; if there is no suffix in the file name, the default is shell colorizing. - A font compatible whith french accents. - Functions accessible directly from keyboard, like f8 for "search all ocurrences of a pattern". - Keypad digits recognized. You can now edit with crisp: mcr file1 ... filen. mcr stands for "Motif CRisp". 2. EDITING: We describe below how to acces the basics functions with the keyboard. All those functions can also be accessed with the mouse, using the upper menus. Moving arrows, page up and down, ^page_up goes to the beginning of the file, ^page_down to the end, end of line key, ... Save, exit, ... alt-w save file alt-x exit alt-w alt-x save and exit ^AE reload current file (i.e. read from file to memory). This is useful if the file was changed by another application and you want to update it in the editor, or when you want to discard all changes done since last save. Marking part of the file alt-l mark lines alt-m mark part of lines alt-c mark rectangular areas Put marked area in the scrap Paste scrap Delete marked area to scrap if no area is marked, the current line is deleted to scrap Delete marked area without putting it to the scrap Delete current line without putting it to the scrap ^D File functions alt-r insert contents of a file below cursor alt-r insert contents of a file below cursor, choosing the file from a menu alt-e edit another file alt-e edit another file, choosing the file from a menu alt-b get the list of currently edited files alt-n go to next edited file alt-p go to previous edited file Write a marked area on a file: mark an area and then alt-w. Search and replace f5 search text f6 replace text then appear the following options: yes replace current match with the new one no do not replace current match with the new one global replace all matches from cursor to end of file all replace all matches in the file top moves cursor to top of page mid moves cursor to mid of page undo undo last replace Note that options like whole word only, case sensitive, block search (i.e. in the marked area only), are available in the "Search & replace" menu got with the mouse. f8 search for all occurrences in all edited files You can then choose in the menu, and then go to next occurence (^N) or the previous occurrence (^P). Find -> Grep... search for a text in multiple files from a directory vi emulator Crisp supports a large subset of the vi/ex 'colon' commands at the command prompt. For example you can delete all lines containing the word 'cat' by typing the following: g/cat/d Multiple window editing Typing f3 and then an arrow key, creates you a subwindow in the direction given by this arrow. Typing shift and an arrow key allows you to change current editing subwindow. You cal also click with the mouse. Typing f4 and then an arrow key, deletes the subwindow in the direction of the arrow. Typing f2 is for redimensionning the size of an existing subwindow: f2, then an arrow key to choose the border to move, and then arrow keys to move the border. When the size is OK, type . ^Z subwindow zoom toggle: makes a forward zoom on the current subwindow. This means that the current subwindow will occupy all possible place in the total window. Type ^Z again to unzoom, i.e. to see again all subwindows. Miscellaneous alt-i toggle insert and overwrite modes indent lines: mark an area with alt-l then use or to indent to the right or to the left the marked lines. ^Q locate matching (), {} or []. ^F process text formatting in the marked area. This is useful to justify text in ".doc" files mainly. In other files (shells, fortran codes, ...) the marked area is supposed to be comments. ^ keyword complete: you write the firsts characters of a word, and when typing ^, crisp will search backwards for a word beginning with the same characters and replace the whole word at current cursor place. This is useful while typing long names. mark area and then type toupper switch all letters from small to capital. mark area and then type tolower switch all letters from capital to small. Customizing Colors You can change the colors of foreground & background normal text, numeric constants, comments, ... while going to the Options -> Color menu. Quit with OK and then Options -> Save setup Fonts You can change the fonts while going to the Options -> Font menu. Quit with OK and then Options -> Save setup Cursor You can change the cursor aspect while going to the Options -> Cursor settings menu. Quit with OK and then Options -> Save setup Keyboard You can reconfigure the keyboard as you wish: go to the Options -> Key bindings menu. If you click in the "Key stroke" area, you then can test which function is done while typing a given key. Clicking in the "Macro to invoke" area allows you to change the function of this key. Quit with OK and then Options -> Save setup Search & replace You can set the default switches, like "Whole word only", "Case sensitive" through the Options -> Search & Replace menu. Quit with OK and then Options -> Save setup This documentation explains only basic operations. See Help -> User guide for further explanations!...