aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/html.vim
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2022-11-19 10:31:51 +0000
committerGitHub <noreply@github.com>2022-11-19 10:31:51 +0000
commit7c57f06b63f7c4e3b62a765b7b7814ef017a602d (patch)
treee78b4afb39f054bb32e283e1c019fdea22117b55 /runtime/syntax/html.vim
parentaf204dd0f193c3cd3154156c9f9fd40199b840c6 (diff)
downloadrneovim-7c57f06b63f7c4e3b62a765b7b7814ef017a602d.tar.gz
rneovim-7c57f06b63f7c4e3b62a765b7b7814ef017a602d.tar.bz2
rneovim-7c57f06b63f7c4e3b62a765b7b7814ef017a602d.zip
vim-patch:partial:d13166e788fc (#21109)
Update runtime files https://github.com/vim/vim/commit/d13166e788fcaef59ec65c20b46ca4be16625669 - Skip E1309-1311 (not ported). - Skip `:echowindow` changes (not ported). - Skip termdebug winbar doc changes (not fully ported). - Port missing `g:termdebug_config.{wide,use_prompt}` changes from v8.2.5010. Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'runtime/syntax/html.vim')
-rw-r--r--runtime/syntax/html.vim12
1 files changed, 11 insertions, 1 deletions
diff --git a/runtime/syntax/html.vim b/runtime/syntax/html.vim
index 9061bdee90..605db3ae1c 100644
--- a/runtime/syntax/html.vim
+++ b/runtime/syntax/html.vim
@@ -3,7 +3,7 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainers: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
" Claudio Fleiner <claudio@fleiner.com>
-" Last Change: 2022 Jul 20
+" Last Change: 2022 Nov 18
" Please check :help html.vim for some comments and a description of the options
@@ -272,6 +272,16 @@ if main_syntax == "html"
syn sync minlines=10
endif
+" Folding
+" Originally by Ingo Karkat and Marcus Zanona
+if get(g:, "html_syntax_folding", 0)
+ syn region htmlFold start="<\z(\<\%(area\|base\|br\|col\|command\|embed\|hr\|img\|input\|keygen\|link\|meta\|param\|source\|track\|wbr\>\)\@![a-z-]\+\>\)\%(\_s*\_[^/]\?>\|\_s\_[^>]*\_[^>/]>\)" end="</\z1\_s*>" fold transparent keepend extend containedin=htmlHead,htmlH\d
+ " fold comments (the real ones and the old Netscape ones)
+ if exists("html_wrong_comments")
+ syn region htmlComment start=+<!--+ end=+--\s*>\%(\n\s*<!--\)\@!+ contains=@Spell fold
+ endif
+endif
+
" The default highlighting.
hi def link htmlTag Function
hi def link htmlEndTag Identifier