annotate runtime/syntax/hgcommit.vim @ 31798:5948cc887603 v9.0.1231

patch 9.0.1231: completion of :runtime does not handle {where} argument Commit: https://github.com/vim/vim/commit/3770f4c9cde7b5fcd10b6fa2e665cd0b69450fb2 Author: zeertzjq <zeertzjq@outlook.com> Date: Sun Jan 22 18:38:51 2023 +0000 patch 9.0.1231: completion of :runtime does not handle {where} argument Problem: Completion of :runtime does not handle {where} argument. Solution: Parse the {where} argument. (closes https://github.com/vim/vim/issues/11863)
author Bram Moolenaar <Bram@vim.org>
date Sun, 22 Jan 2023 19:45:04 +0100
parents 7d68a90cbf5c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
31579
7d68a90cbf5c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3830
diff changeset
2 " Language: hg/sl (Mercurial / Sapling) commit file
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 " Maintainer: Ken Takata <kentkt at csc dot jp>
31579
7d68a90cbf5c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3830
diff changeset
4 " Max Coplan <mchcopl@gmail.com>
7d68a90cbf5c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3830
diff changeset
5 " Last Change: 2022-12-08
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 " License: VIM License
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 " URL: https://github.com/k-takata/hg-vim
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 if exists("b:current_syntax")
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 finish
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 endif
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12
31579
7d68a90cbf5c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3830
diff changeset
13 syn match hgcommitComment "^\%(SL\|HG\): .*$" contains=@NoSpell
7d68a90cbf5c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3830
diff changeset
14 syn match hgcommitUser "^\%(SL\|HG\): user: \zs.*$" contains=@NoSpell contained containedin=hgcommitComment
7d68a90cbf5c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3830
diff changeset
15 syn match hgcommitBranch "^\%(SL\|HG\): branch \zs.*$" contains=@NoSpell contained containedin=hgcommitComment
7d68a90cbf5c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3830
diff changeset
16 syn match hgcommitAdded "^\%(SL\|HG\): \zsadded .*$" contains=@NoSpell contained containedin=hgcommitComment
7d68a90cbf5c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3830
diff changeset
17 syn match hgcommitChanged "^\%(SL\|HG\): \zschanged .*$" contains=@NoSpell contained containedin=hgcommitComment
7d68a90cbf5c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3830
diff changeset
18 syn match hgcommitRemoved "^\%(SL\|HG\): \zsremoved .*$" contains=@NoSpell contained containedin=hgcommitComment
7d68a90cbf5c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3830
diff changeset
19
7d68a90cbf5c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3830
diff changeset
20 syn region hgcommitDiff start=/\%(^\(SL\|HG\): diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|@@\@!\|[^[:alnum:]\ +-]\S\@!\)\@=/ fold contains=@hgcommitDiff
7d68a90cbf5c Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3830
diff changeset
21 syn include @hgcommitDiff syntax/shared/hgcommitDiff.vim
3750
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 hi def link hgcommitComment Comment
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 hi def link hgcommitUser String
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 hi def link hgcommitBranch String
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 hi def link hgcommitAdded Identifier
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 hi def link hgcommitChanged Special
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 hi def link hgcommitRemoved Constant
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29
536aa8b0c934 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 let b:current_syntax = "hgcommit"