annotate runtime/syntax/manual.vim @ 33899:a9ccbadecda1 v9.0.2155

patch 9.0.2155: Vim9: type not kept when assigning vars Commit: https://github.com/vim/vim/commit/d33518522a84b5625e663c1b608e1c68f9f58003 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Fri Dec 8 21:41:23 2023 +0100 patch 9.0.2155: Vim9: type not kept when assigning vars Problem: Vim9: type not kept when assigning vars Solution: When assigning a List or a Dict value to a variable of type 'any', keep the type closes: #13639 closes: #13646 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 10 Dec 2023 15:16:34 +0100
parents 4027cefc2aab
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax support file
32770
4027cefc2aab Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents: 7879
diff changeset
2 " Maintainer: The Vim Project <https://github.com/vim/vim>
4027cefc2aab Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents: 7879
diff changeset
3 " Last Change: 2023 Aug 10
4027cefc2aab Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents: 7879
diff changeset
4 " Former Maintainer: Bram Moolenaar <Bram@vim.org>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " This file is used for ":syntax manual".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " It installs the Syntax autocommands, but no the FileType autocommands.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if !has("syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " Load the Syntax autocommands and set the default methods for highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 if !exists("syntax_on")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 so <sfile>:p:h/synload.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 let syntax_manual = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
7879
895150cd3e6f commit https://github.com/vim/vim/commit/885f24fbcae2a39ae496ffb3a1e139379be8fae1
Christian Brabandt <cb@256bit.org>
parents: 1619
diff changeset
20 " Overrule the connection between FileType and Syntax autocommands. This sets
895150cd3e6f commit https://github.com/vim/vim/commit/885f24fbcae2a39ae496ffb3a1e139379be8fae1
Christian Brabandt <cb@256bit.org>
parents: 1619
diff changeset
21 " the syntax when the file type is detected, without changing the value.
895150cd3e6f commit https://github.com/vim/vim/commit/885f24fbcae2a39ae496ffb3a1e139379be8fae1
Christian Brabandt <cb@256bit.org>
parents: 1619
diff changeset
22 augroup syntaxset
895150cd3e6f commit https://github.com/vim/vim/commit/885f24fbcae2a39ae496ffb3a1e139379be8fae1
Christian Brabandt <cb@256bit.org>
parents: 1619
diff changeset
23 au! FileType * exe "set syntax=" . &syntax
895150cd3e6f commit https://github.com/vim/vim/commit/885f24fbcae2a39ae496ffb3a1e139379be8fae1
Christian Brabandt <cb@256bit.org>
parents: 1619
diff changeset
24 augroup END
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " If the GUI is already running, may still need to install the FileType menu.
1619
b9740fb41986 updated for version 7.2a
vimboss
parents: 7
diff changeset
27 " Don't do it when the 'M' flag is included in 'guioptions'.
b9740fb41986 updated for version 7.2a
vimboss
parents: 7
diff changeset
28 if has("menu") && has("gui_running") && !exists("did_install_syntax_menu") && &guioptions !~# 'M'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 source $VIMRUNTIME/menu.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 endif