Mercurial > vim
annotate runtime/syntax/jargon.vim @ 22643:71b57779177d v8.2.1870
patch 8.2.1870: Vim9: no need to keep all script variables
Commit: https://github.com/vim/vim/commit/39ca4127a094d8aca6f77c01be4f3fea506d5cb7
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Oct 20 14:25:07 2020 +0200
patch 8.2.1870: Vim9: no need to keep all script variables
Problem: Vim9: no need to keep all script variables.
Solution: Only keep script variables when a function was defined that could
use them. Fix freeing static string on exit.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 20 Oct 2020 14:30:04 +0200 |
parents | bceeded72898 |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Jargon File | |
18186 | 3 " Maintainer: Dan Church (https://github.com/h3xx) |
19721 | 4 " Last Change: 2020 Mar 16 |
7 | 5 " |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
6 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
7 if exists("b:current_syntax") |
7 | 8 finish |
9 endif | |
10 | |
19721 | 11 syn region jargonHeader start="^:" end="$" contains=jargonChaptTitle |
12 syn match jargonChaptTitle /:[^:]*:/ contained | |
13 syn match jargonEmailAddr /[+._A-Za-z0-9-]\+@[+._A-Za-z0-9-]\+/ | |
14 syn match jargonUrl +\(https\?\|ftp\)://[^\t )"]*+ | |
15 syn region jargonMark start="{[^\t {}]" end="}" | |
7 | 16 |
17 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
18 " Only when an item doesn't have highlighting yet |
19721 | 19 hi def link jargonChaptTitle Title |
20 hi def link jargonEmailAddr Comment | |
21 hi def link jargonUrl Comment | |
22 hi def link jargonMark Label | |
7 | 23 |
24 let b:current_syntax = "jargon" |