annotate runtime/syntax/nosyntax.vim @ 12337:040a892d0eed v8.0.1048

patch 8.0.1048: no test for what 8.0.1020 fixes commit https://github.com/vim/vim/commit/5e80de3f3e572805fe734b66bc42c13303ad9bdb Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 3 15:48:12 2017 +0200 patch 8.0.1048: no test for what 8.0.1020 fixes Problem: No test for what 8.0.1020 fixes. Solution: Add test_feedinput(). Add a test. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/2046)
author Christian Brabandt <cb@256bit.org>
date Sun, 03 Sep 2017 16:00:05 +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