Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
django.vim87 linesDownload Raw Back to syntax
1" Vim syntax file2" Language:	Django template3" Maintainer:	Dave Hodder <dmh@dmh.org.uk>4" Last Change:	2021 Nov 295" 2026 Feb 12 by Vim Project add partial support #193866 7" quit when a syntax file was already loaded8if exists("b:current_syntax")9  finish10endif11 12syntax case match13 14" Mark illegal characters15syn match djangoError "%}\|}}\|#}"16 17" Django template built-in tags and parameters18" 'comment' doesn't appear here because it gets special treatment19syn keyword djangoStatement contained autoescape csrf_token empty20" FIXME ==, !=, <, >, <=, and >= should be djangoStatements:21" syn keyword djangoStatement contained == != < > <= >=22syn keyword djangoStatement contained and as block endblock by cycle debug else elif23syn keyword djangoStatement contained extends filter endfilter firstof for24syn keyword djangoStatement contained endfor if endif ifchanged endifchanged25syn keyword djangoStatement contained ifequal endifequal ifnotequal26syn keyword djangoStatement contained endifnotequal in include load not now or27syn keyword djangoStatement contained parsed regroup reversed spaceless28syn keyword djangoStatement contained endspaceless ssi templatetag openblock29syn keyword djangoStatement contained closeblock openvariable closevariable30syn keyword djangoStatement contained openbrace closebrace opencomment31syn keyword djangoStatement contained closecomment widthratio url with endwith32syn keyword djangoStatement contained get_current_language trans noop blocktrans33syn keyword djangoStatement contained endblocktrans get_available_languages34syn keyword djangoStatement contained get_current_language_bidi plural35syn keyword djangoStatement contained translate blocktranslate endblocktranslate36syn keyword djangoStatement contained partialdef endpartialdef partial37 38" Django templete built-in filters39syn keyword djangoFilter contained add addslashes capfirst center cut date40syn keyword djangoFilter contained default default_if_none dictsort41syn keyword djangoFilter contained dictsortreversed divisibleby escape escapejs42syn keyword djangoFilter contained filesizeformat first fix_ampersands43syn keyword djangoFilter contained floatformat get_digit join last length length_is44syn keyword djangoFilter contained linebreaks linebreaksbr linenumbers ljust45syn keyword djangoFilter contained lower make_list phone2numeric pluralize46syn keyword djangoFilter contained pprint random removetags rjust slice slugify47syn keyword djangoFilter contained safe safeseq stringformat striptags48syn keyword djangoFilter contained time timesince timeuntil title truncatechars49syn keyword djangoFilter contained truncatewords truncatewords_html unordered_list upper urlencode50syn keyword djangoFilter contained urlize urlizetrunc wordcount wordwrap yesno51 52" Keywords to highlight within comments53syn keyword djangoTodo contained TODO FIXME XXX54 55" Django template constants (always surrounded by double quotes)56syn region djangoArgument contained start=/"/ skip=/\\"/ end=/"/57 58" Mark illegal characters within tag and variables blocks59syn match djangoTagError contained "#}\|{{\|[^%]}}\|[&#]"60syn match djangoVarError contained "#}\|{%\|%}\|[<>!&#%]"61 62" Django template tag and variable blocks63syn region djangoTagBlock start="{%" end="%}" contains=djangoStatement,djangoFilter,djangoArgument,djangoTagError display64syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgument,djangoVarError display65 66" Django template 'comment' tag and comment block67syn region djangoComment start="{%\s*comment\(\s\+.\{-}\)\?%}" end="{%\s*endcomment\s*%}" contains=djangoTodo68syn region djangoComBlock start="{#" end="#}" contains=djangoTodo69 70" Define the default highlighting.71" Only when an item doesn't have highlighting yet72 73hi def link djangoTagBlock PreProc74hi def link djangoVarBlock PreProc75hi def link djangoStatement Statement76hi def link djangoFilter Identifier77hi def link djangoArgument Constant78hi def link djangoTagError Error79hi def link djangoVarError Error80hi def link djangoError Error81hi def link djangoComment Comment82hi def link djangoComBlock Comment83hi def link djangoTodo Todo84 85 86let b:current_syntax = "django"87 
codekingpro/portable-devtools · Team Ai