Skip to content

Instantly share code, notes, and snippets.

@libitte
Created February 1, 2014 03:03
Show Gist options
  • Select an option

  • Save libitte/8747371 to your computer and use it in GitHub Desktop.

Select an option

Save libitte/8747371 to your computer and use it in GitHub Desktop.
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.
@libitte
Copy link
Copy Markdown
Author

libitte commented Feb 1, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment