Skip to content

Instantly share code, notes, and snippets.

@alfredodeza
Created January 12, 2017 21:22
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alfredodeza/eee0725b3474317a7c90aef7305afe5c to your computer and use it in GitHub Desktop.
Save alfredodeza/eee0725b3474317a7c90aef7305afe5c to your computer and use it in GitHub Desktop.
Syntax file for tox.ini
" Vim syntax file
" Language: Configuration File (ini file) for Python's tox
" Version: 0.1
" Original Author: Alfredo Deza
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" shut case off
syn case ignore
syn match dosiniLabel "^\w*"
syn region Preproc start="^\s*\[" end="\]"
syn match dosiniComment "^[#;].*$"
syn region dosiniComment start="^\s*#" end="$"
syn region Number start="{" end="}"
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_dosini_syntax_inits")
if version < 508
let did_dosini_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink dosiniNumber Number
HiLink dosiniHeader Special
HiLink dosiniComment Comment
HiLink dosiniLabel Type
delcommand HiLink
endif
let b:current_syntax = "dosini"
" vim: sts=2 sw=2 et
@alfredodeza
Copy link
Author

Place it in ~/.vim/syntax/ and go to town on tox.ini files

@atugushev
Copy link

Thanks a lot!

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