Changing syntax highlighting mode back polski | english

up

VIM

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
:set syntax=csh
or C mode as well as C++ :set syntax=c
:set syntax=cpp
also Python :set syntax=python
or even Fortran :set syntax=fortran
Java, JavaScript, PHP, Pascal, HTML :set syntax=java
:set syntax=javascript
:set syntax=php
:set syntax=pascal
:set syntax=html

and many many more VIM can offer.

up

Emacs

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
M-x cpp-mode
also Python M-x python-mode
or even Fortran M-x fortran-mode
Java, JavaScript, PHP, Pascal, HTML M-x java-mode
M-x javascript-mode
M-x php-mode
M-x pascal-mode
M-x html-mode

webmaster of this page is Jan Skowron, page is hosted on server astrouw.edu.pl
Valid HTML! Valid CSS!