Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
wiki:vim [2015/03/31 17:10] – [Syntax Highlighting] martinr | wiki:vim [2015/04/01 10:21] (aktuell) – [VIM] martinr | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ====== VIM ====== | ||
+ | |||
1. vim ist besser als emacs | 1. vim ist besser als emacs | ||
2. goto 1. | 2. goto 1. | ||
- | => vim ist der editor deiner wahl | + | => vim ist der editor deiner wahl :!: |
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
- | ====== Tips und Tricks ====== | ||
===== Syntax Highlighting ===== | ===== Syntax Highlighting ===== | ||
- | === Syntax Highlighting in HEREDOCS === | + | ==== Syntax Highlighting in HEREDOCS |
- | When for instance writing mathematica scripts as a HEREDOC within a shell script to be passed to the mathematica kernel - as shown in the example below - it can be annoying reading the mathematica part for usually only shell script syntax highlighting is activated. The heredoc is then shown in completely one color, whereas the shell commands are fancyly | + | When for instance writing mathematica scripts as a HEREDOC within a shell script to be passed to the mathematica kernel - as shown in the example below - it can be annoying reading the mathematica part for usually only shell script syntax highlighting is activated. The heredoc is then shown in completely one color, whereas the shell commands are fancyly |
<code bash> | <code bash> | ||
- | math -run " | + | math -run " |
(* this is within the heredoc *) | (* this is within the heredoc *) | ||
(* we can write real mathamatica code here *) | (* we can write real mathamatica code here *) | ||
(* we also can use the initialized variables *) | (* we also can use the initialized variables *) | ||
Print[StringJoin[mymmavar1, | Print[StringJoin[mymmavar1, | ||
- | EOF | + | MMASH |
</ | </ | ||
Zeile 27: | Zeile 34: | ||
syntax include @MMA syntax/ | syntax include @MMA syntax/ | ||
let b: | let b: | ||
- | syntax region | + | syntax region |
- | syntax region | + | syntax region |
</ | </ | ||
Now whenever a heredoc within a shell script begins with MMASH, vim recognises it as mathematica code highlighting the syntax correctly. | Now whenever a heredoc within a shell script begins with MMASH, vim recognises it as mathematica code highlighting the syntax correctly. |