User Tools

Site Tools


vim:custom_syntax_highlighting

This is an old revision of the document!


VIM - Custom Syntax Highlighting

Get existing Syntax Highlighting

To get an exhaustive, color-coded list showing what patterns and keywords are mapped to what classes:

:syntax

<file vim syntax> syntax keyword cFunction abort syntax keyword cFunction abs syntax keyword cFunction acos syntax keyword cFunction acosh syntax keyword cFunction alarm … … highlight link cFunction Function </file vim>

NOTE:

  • The top few lines designate certain keywords as belonging to the cFunction class.
  • The line at the bottom links the cFunction class to the universal class Function.

Load the Syntax file

:so ~/.vim/syntax.vim

Keybinding to perform the load of the Syntax file

nmap + :so ~/.vim/syntax.vim<CR>

NOTE: Typing the plus key in normal mode in Vim, will load the custom syntax highlighting rules, based on what language is currently being using.

vim/custom_syntax_highlighting.1613423714.txt.gz · Last modified: 2021/02/15 21:15 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki