annotate runtime/syntax/nosyntax.vim @ 32758:39b1788b1765 v9.0.1698

patch 9.0.1698: Test_map_restore_sid fails in GUI Commit: https://github.com/vim/vim/commit/7fe108990423535fa7cb804deae49d64831e25a9 Author: zeertzjq <zeertzjq@outlook.com> Date: Sat Aug 12 16:31:27 2023 +0800 patch 9.0.1698: Test_map_restore_sid fails in GUI Problem: Test_map_restore_sid fails in GUI Solution: Feed an unsimplified Ctrl-B closes: #12770 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
author Christian Brabandt <cb@256bit.org>
date Sat, 12 Aug 2023 21:00:04 +0200
parents 5117153003bd
children 4027cefc2aab
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Maintainer: Bram Moolenaar <Bram@vim.org>
834
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
3 " Last Change: 2006 Apr 16
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " This file is used for ":syntax off".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " It removes the autocommands and stops highlighting for all buffers.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if !has("syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
834
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
12 " Remove all autocommands for the Syntax event. This also avoids that
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
13 " "syntax=foo" in a modeline triggers the SynSet() function of synload.vim.
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
14 au! Syntax
5117153003bd updated for version 7.0e
vimboss
parents: 7
diff changeset
15
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " remove all syntax autocommands and remove the syntax for each buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 augroup syntaxset
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 au!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 au BufEnter * syn clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 au BufEnter * if exists("b:current_syntax") | unlet b:current_syntax | endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 doautoall syntaxset BufEnter *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 au!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 augroup END
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 if exists("syntax_on")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 unlet syntax_on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 if exists("syntax_manual")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 unlet syntax_manual
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 endif