annotate runtime/syntax/hastepreproc.vim @ 13400:c415cdd49ea4 v8.0.1574

patch 8.0.1574: show cursor in wrong place when using popup menu commit https://github.com/vim/vim/commit/987723e084660290270b3c3d943eb13bd828d5da Author: Bram Moolenaar <Bram@vim.org> Date: Tue Mar 6 11:43:04 2018 +0100 patch 8.0.1574: show cursor in wrong place when using popup menu Problem: Show cursor in wrong place when using popup menu. (Wei Zhang) Solution: Force updating the cursor position. Fix skipping over unused entries.
author Christian Brabandt <cb@256bit.org>
date Tue, 06 Mar 2018 11:45:05 +0100
parents 43efa4f5a8ea
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
1 " Vim syntax file
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
2 " Language: Haste preprocessor files
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
3 " Maintainer: M. Tranchero - maurizio.tranchero@gmail.com
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
4 " Credits: some parts have been taken from vhdl, verilog, and C syntax
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
5 " files
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
6 " Version: 0.5
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
7
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 1668
diff changeset
8 " quit when a syntax file was already loaded
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
9 if exists("b:current_syntax")
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
10 finish
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
11 endif
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 1668
diff changeset
12 " Read the haste syntax to start with
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 1668
diff changeset
13 runtime! syntax/haste.vim
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 1668
diff changeset
14 unlet b:current_syntax
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
15
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
16 " case is significant
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
17 syn case match
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
18
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
19 " C pre-processor directives
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
20 syn match hastepreprocVar display "\$[[:alnum:]_]*"
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
21 syn region hastepreprocVar start="\${" end="}" contains=hastepreprocVar
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
22 "
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
23 "syn region hastepreproc start="#\[\s*tg[:alnum:]*" end="]#" contains=hastepreprocVar,hastepreproc,hastepreprocError,@Spell
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
24 syn region hastepreproc start="#\[\s*\(\|tgfor\|tgif\)" end="$" contains=hastepreprocVar,hastepreproc,@Spell
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
25 syn region hastepreproc start="}\s\(else\)\s{" end="$" contains=hastepreprocVar,hastepreproc,@Spell
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
26 syn region hastepreproc start="^\s*#\s*\(ifndef\|ifdef\|else\|endif\)\>" end="$" contains=@hastepreprocGroup,@Spell
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
27 syn region hastepreproc start="\s*##\s*\(define\|undef\)\>" end="$" contains=@hastepreprocGroup,@Spell
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
28 syn match hastepreproc "}\{0,1}\s*]#"
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
29
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
30 " Define the default highlighting.
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
31 " Only when an item doesn't have highlighting yet
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
32 hi def link hastepreproc Preproc
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
33 hi def link hastepreprocVar Special
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
34 hi def link hastepreprocError Error
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
35
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
36 let b:current_syntax = "hastepreproc"
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
37
0b796e045c42 updated for version 7.2b-000
vimboss
parents:
diff changeset
38 " vim: ts=8