| 140 | | === emacs === |
| | 140 | === emacs === |
| | 141 | To start Emacs, |
| | 142 | just type emacs &. For an introduction to Emacs type C-h t inside Emacs to |
| | 143 | enter the Emacs tutorial. The AucTeX information on the IoA Local Page describes |
| | 144 | a powerful interface to writing LaTeX in Emacs. |
| | 145 | |
| | 146 | You can configure Emacs to your hearts content by editing your own |
| | 147 | version of the Emacs configuration file ~/.emacs (a default .emacs file |
| | 148 | can be copied from /public/Default_Scripts/.emacs, which contains the |
| | 149 | following lines and some additional features that may be useful) e.g. for |
| | 150 | editing text of a specific type that emacs knows about, such as fortran, |
| | 151 | tex, c or idl script code, you should switch to the appropriate major mode |
| | 152 | so that coloured text can be used to highlight different sections of text, |
| | 153 | add the following lines to this file: |
| | 154 | |
| | 155 | (setq font-lock-face-attributes |
| | 156 | '((font-lock-comment-face "SeaGreen" nil nil t nil nil) |
| | 157 | (font-lock-variable-name-face "blue") |
| | 158 | (font-lock-string-face "red") |
| | 159 | (font-lock-function-name-face "Magenta") |
| | 160 | (font-lock-keyword-face "blue") |
| | 161 | (font-lock-type-face "MediumOrchid") |
| | 162 | (font-lock-reference-face "orchid"))) |
| | 163 | (setq emacs-lisp-mode-hook 'turn-on-font-lock) |
| | 164 | (setq latex-mode-hook 'turn-on-font-lock) |
| | 165 | (setq tex-mode-hook 'turn-on-font-lock) |
| | 166 | (setq fortran-mode-hook 'turn-on-font-lock) |
| | 167 | (setq info-mode-hook 'turn-on-font-lock) |
| | 168 | (setq dired-mode-hook 'turn-on-font-lock) |
| | 169 | |
| | 170 | For IDL scripts (.pro files) you can similar obtain coloured text and recognise IDL syntax by adding the lines: |
| | 171 | |
| | 172 | (autoload 'idlwave-mode "idlwave" "IDLWAVE Mode" t) |
| | 173 | (autoload 'idlwave-shell "idlw-shell" "IDLWAVE Shell" t) |
| | 174 | (setq auto-mode-alist |
| | 175 | (cons '("\\.pro\\'" . idlwave-mode) auto-mode-alist)) |
| | 176 | (setq idlwave-help-directory "/usr/local/etc") |
| | 177 | (add-hook 'idlwave-mode-hook 'turn-on-font-lock) |
| | 178 | |
| | 179 | |
| | 180 | |
| | 182 | vi stands for VIsual editor, and it is the standard UNIX editor. |
| | 183 | As such it is widely used. The advantage of vi is that whatever linux/Unix |
| | 184 | system you use, there will be a version of vi there, it is also |
| | 185 | compact and quick, much quicker to start up than for instance emacs or nedit. |
| | 186 | The downside is that it is difficult to learn, more so than emacs. |
| | 187 | If you are not going to use it, you only need to know that you get |
| | 188 | out of it by typing :q or :q! to avoid saving the file. |
| | 189 | |