Commit: runtime(django): Add missing statements and filters.

0 views
Skip to first unread message

Christian Brabandt

unread,
Apr 17, 2026, 11:00:14 AM (23 hours ago) Apr 17
to vim...@googlegroups.com
runtime(django): Add missing statements and filters.

Commit: https://github.com/vim/vim/commit/6b26afea3b95fc9f5af9b0c0c6700007f8a6ae5e
Author: tecis <6780981...@users.noreply.github.com>
Date: Fri Apr 17 14:44:51 2026 +0000

runtime(django): Add missing statements and filters.

Added the fallowing.

djangoStatement:

- querystring: Added in version Django 5.2.
- lorem: Added in version Django 1.8.
- verbatim: Added in version Django 1.10.

djangoFilter:

- force_escape: Added in version Django 1.8.
- iriencode: Added in version Django 1.8.
- json_script: Added in version 2.1.
- truncatechars_html: Added in version 1.7.

> According to current documentation the added keywords are supported [Django version 6](https://docs.djangoproject.com/en/6.0/ref/templates/builtins).

related: #19994

Signed-off-by: tecis <6780981...@users.noreply.github.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/syntax/django.vim b/runtime/syntax/django.vim
index 353221af0..6fdf3cdcb 100644
--- a/runtime/syntax/django.vim
+++ b/runtime/syntax/django.vim
@@ -34,6 +34,7 @@ syn keyword djangoStatement contained endblocktrans get_available_languages
syn keyword djangoStatement contained get_current_language_bidi plural
syn keyword djangoStatement contained translate blocktranslate endblocktranslate
syn keyword djangoStatement contained partialdef endpartialdef partial
+syn keyword djangoStatement contained querystring lorem verbatim

" Django templete built-in filters
syn keyword djangoFilter contained add addslashes capfirst center cut date
@@ -48,6 +49,7 @@ syn keyword djangoFilter contained safe safeseq stringformat striptags
syn keyword djangoFilter contained time timesince timeuntil title truncatechars
syn keyword djangoFilter contained truncatewords truncatewords_html unordered_list upper urlencode
syn keyword djangoFilter contained urlize urlizetrunc wordcount wordwrap yesno
+syn keyword djangoFilter contained force_escape iriencode json_script truncatechars_html

" Keywords to highlight within comments
syn keyword djangoTodo contained TODO FIXME XXX
Reply all
Reply to author
Forward
0 new messages