In Vi Improved to change or set desired syntax highlighting mode to MODE you have to type in VIM's command line:
:set syntax=MODE
It is very usefull when your file does not have standard extension or you are editting file with two languages in it, eg. AWK commands in a BASH script.
You can set AWK mode | :set syntax=awk |
BASH ar CSH mode |
:set syntax=sh |
or C mode as well as C++ |
:set syntax=c |
also Python | :set syntax=python |
or even Fortran | :set syntax=fortran |
Java, JavaScript, PHP, Pascal, HTML |
:set syntax=java |
and many many more VIM can offer.
Similarly in Emacs to change or set desired syntax highlighting mode to MODE you have to type:
M-x MODE-mode
or
Alt-x MODE-mode
Modes definitions usually are placed in directory:
/usr/share/emacs/site-lisp/*.el
You can set AWK mode | M-x awk-mode |
BASH mode |
M-x sh-mode
|
or C mode as well as C++ |
M-x c-mode |
also Python | M-x python-mode |
or even Fortran | M-x fortran-mode |
Java, JavaScript, PHP, Pascal, HTML |
M-x java-mode |