annotate syntax/hgcommit.vim @ 91:e21a1819ab27

New command to export a patch and allow existing log command to take options. * Hglogexport command takes patch name as input. If the env variable HG_EXPORT_PATCH_DIR is set, then the patch will be created under it. Otherwise, it will be created in the directory from which vim was launched. * HgLog command takes options that can be passed to hg log command. E.g., the following command will list just 3 logs by user bob. :Hglog -u bob -l 3 Testing: * Patch gets created under the right directory when env variable is set and not set. * Hglog command honors -u and -l options. It also works when current file name is given as input --> :Hglog % -u bob -l 3
author Kannan Rajah <krajah@maprtech.com>
date Sat, 05 Jul 2014 17:16:42 -0700
parents adc267e2f0f4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
1 " Vim syntax file
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
2 " Language: hg commit file
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
3 " Maintainer: Pierre Bourdon <delroth@gmail.com>
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
4 " Filenames: ^hg-editor-*.txt
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
5 " Last Change: 2010 Jun 13
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
6
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
7 " Some parts of the code by Dan LaMotte <lamotte85@gmail.com>
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
8
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
9 if exists("b:current_syntax")
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
10 finish
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
11 endif
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
12
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
13 syn case match
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
14 syn sync minlines=50
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
15
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
16 if has("spell")
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
17 syn spell toplevel
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
18 endif
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
19
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
20 syn match hgcommitFirstline "\%^.*" nextgroup=hgcommitBlank skipnl
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
21 syn match hgcommitSummary "^.\{0,78\}" contained containedin=hgcommitFirstline nextgroup=hgcommitOverflow contains=@Spell
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
22 syn match hgcommitOverflow ".*" contained contains=@Spell
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
23 syn match hgcommitBlank "^HG:\@!.*" contained contains=@Spell
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
24
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
25 syn match hgcommitComment "^HG:.*"
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
26
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
27 syn match hgcommitOnBranch "\%(^HG: \)\@<=\<branch\> '" contained containedin=hgcommitComment nextgroup=hgcommitBranch
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
28 syn match hgcommitBranch "[^']\+" contained
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
29 syn match hgcommitAdded "\%(^HG: \)\@<=\<added\>" contained containedin=hgcommitComment nextgroup=hgcommitFile
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
30 syn match hgcommitChanged "\%(^HG: \)\@<=\<changed\>" contained containedin=hgcommitComment nextgroup=hgcommitFile
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
31 syn match hgcommitRemoved "\%(^HG: \)\@<=\<removed\>" contained containedin=hgcommitComment nextgroup=hgcommitFile
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
32 syn match hgcommitFile " \S\+" contained containedin=hgcommitAdded,hgcommitChanged
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
33
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
34 hi def link hgcommitSummary Keyword
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
35 hi def link hgcommitOverflow Error
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
36 hi def link hgcommitBlank Error
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
37
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
38 hi def link hgcommitComment Comment
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
39 hi def link hgcommitOnBranch Comment
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
40 hi def link hgcommitBranch Special
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
41 hi def link hgcommitOnBranchEnd Comment
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
42 hi def link hgcommitAdded Type
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
43 hi def link hgcommitChanged Type
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
44 hi def link hgcommitRemoved Type
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
45 hi def link hgcommitFile Constant
adc267e2f0f4 Added syntax highlighting for hgstatus window.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
46