Vim Syntax Highlighting
From UCLUG
Contents |
Syntax Highlighting
What it is
- indicating syntax of language via coloring, font altering, etc
How to activate in Vim
- Just Works option
- Doesn't work option
- verify Vim compiled with
+syntax-
:version -
vim --versionorgvim --version - if not, check if package is vim-minimal; get vim-enhanced
-
- file type not correctly detected
- Check:
:set filetype - Change:
:se ft=c
- Check:
- verify Vim compiled with
What syntaxes supported?
- Look in Vim syntax directory (eg,
/usr/share/vim/vim72/syntax/)
Other info
-
:syntax - shows what matches
-
:highlight - shows color scheme
-
:set background - changes contrast based on terminal, alters color scheme slightly
-
:hardcopy - creates printout
-
:TOhtml - if
:hadoesn't work, launch in web browser, then print

