[Tutor] Python syntax highligting with Vim
kromag@nsacom.net
kromag@nsacom.net
Thu, 31 May 2001 09:02:08 -0700 (PDT)
I found the following python.vim file:
syn match pythonSpecialCharacter "\['"?\abfnrtv]" contained
syn match pythonSpecialCharacter "\(0x)=[0123456789]{1,3}"
contained
hi link pythonSpecialCharacter pythonFormat
syn match pythonFormat contained "%%"
syn match pythonFormat "%(d+$)=[-+' #0*]
*(d*|*|*d+$)(.(d*|*|*d+$))=([hlL]|ll)
=([diuoxXfeEgGcCsSpn]|[^=.[^]]*])" contained
syn match pythonFormat "%([^)]+)(d+(.d+)=)=
[sdf]" contained
syn region pythonString start=+'+ end=+'+ skip=+\\|\'+
contains=pythonFormat,pythonSpecialCharacter
syn region pythonString start=+"+ end=+"+ skip=+\\|\"+
contains=pythonFormat,pythonSpecialCharacter
syn region pythonString start=+"""+ end=+"""+
contains=pythonFormat,pythonSpecialCharacter
syn region pythonString start=+'''+ end=+'''+
contains=pythonFormat,pythonSpecialCharacter
and would like to implement it in gvim under windows. I cannot find any
documentation on turning on syntax highligting. Can anyone point to a good
howto?