Mercurial > vim
annotate runtime/syntax/viminfo.vim @ 35714:f7c1a8e37c0b v9.1.0592
patch 9.1.0592: runtime: filetype: Mediawiki files are not recognized
Commit: https://github.com/vim/vim/commit/b5844104ab1259e061e023ea6259e4eb002e7170
Author: AvidSeeker <avidseeker7@protonmail.com>
Date: Tue Jul 16 21:10:50 2024 +0200
patch 9.1.0592: runtime: filetype: Mediawiki files are not recognized
Problem: filetype: Mediawiki files are not recognized
Solution: detect "*.mw" and "*.wiki" as mediawiki filetype,
include basic syntax and filetype plugins.
(AvidSeeker)
closes: #15266
Signed-off-by: AvidSeeker <avidseeker7@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 17 Jul 2024 08:13:58 +0200 |
parents | 4027cefc2aab |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Vim .viminfo file | |
32770
4027cefc2aab
Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents:
9286
diff
changeset
|
3 " 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:
9286
diff
changeset
|
4 " Last Change: 2023 Aug 10 |
4027cefc2aab
Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
Christian Brabandt <cb@256bit.org>
parents:
9286
diff
changeset
|
5 " Former Maintainer: Bram Moolenaar <Bram@vim.org> |
7 | 6 |
344 | 7 " Quit when a (custom) syntax file was already loaded |
8 if exists("b:current_syntax") | |
7 | 9 finish |
10 endif | |
11 | |
3312 | 12 let s:cpo_save = &cpo |
13 set cpo&vim | |
14 | |
7 | 15 " The lines that are NOT recognized |
16 syn match viminfoError "^[^\t].*" | |
17 | |
18 " The one-character one-liners that are recognized | |
19 syn match viminfoStatement "^[/&$@:?=%!<]" | |
20 | |
21 " The two-character one-liners that are recognized | |
22 syn match viminfoStatement "^[-'>"]." | |
23 syn match viminfoStatement +^"".+ | |
24 syn match viminfoStatement "^\~[/&]" | |
25 syn match viminfoStatement "^\~[hH]" | |
26 syn match viminfoStatement "^\~[mM][sS][lL][eE]\d\+\~\=[/&]" | |
27 | |
28 syn match viminfoOption "^\*.*=" contains=viminfoOptionName | |
29 syn match viminfoOptionName "\*\a*"ms=s+1 contained | |
30 | |
31 " Comments | |
32 syn match viminfoComment "^#.*" | |
33 | |
9286
64035abb986b
commit https://github.com/vim/vim/commit/c95a302a4c42ec8230473cd4a5e0064d0a143aa8
Christian Brabandt <cb@256bit.org>
parents:
3312
diff
changeset
|
34 " New style lines. TODO: highlight numbers and strings. |
64035abb986b
commit https://github.com/vim/vim/commit/c95a302a4c42ec8230473cd4a5e0064d0a143aa8
Christian Brabandt <cb@256bit.org>
parents:
3312
diff
changeset
|
35 syn match viminfoNew "^|.*" |
64035abb986b
commit https://github.com/vim/vim/commit/c95a302a4c42ec8230473cd4a5e0064d0a143aa8
Christian Brabandt <cb@256bit.org>
parents:
3312
diff
changeset
|
36 |
7 | 37 " Define the default highlighting. |
344 | 38 " Only used when an item doesn't have highlighting yet |
39 hi def link viminfoComment Comment | |
40 hi def link viminfoError Error | |
41 hi def link viminfoStatement Statement | |
9286
64035abb986b
commit https://github.com/vim/vim/commit/c95a302a4c42ec8230473cd4a5e0064d0a143aa8
Christian Brabandt <cb@256bit.org>
parents:
3312
diff
changeset
|
42 hi def link viminfoNew String |
7 | 43 |
44 let b:current_syntax = "viminfo" | |
45 | |
3312 | 46 let &cpo = s:cpo_save |
47 unlet s:cpo_save | |
48 | |
7 | 49 " vim: ts=8 sw=2 |