summaryrefslogtreecommitdiff
path: root/_config/206-gina.vim
blob: 0bd8079fdaffe8d399ca8fad58cce0347c7da670 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
if empty(globpath(&rtp, 'autoload/gina.vim'))
  finish
endif

let g:gina#command#browse#translation_patterns = get(g:, 'gina#command#browse#translation_patterns', {})

call extend(g:gina#command#browse#translation_patterns, {
\   'github\.com': [
\     [
\       '\vhttps?://(%domain)/(.{-})/(.{-})%(\.git)?$',
\       '\vgit://(%domain)/(.{-})/(.{-})%(\.git)?$',
\       '\vgit\@(%domain):(.{-})/(.{-})%(\.git)?$',
\       '\vssh://git\@(%domain)/(.{-})/(.{-})%(\.git)?$',
\     ], {
\       '_': 'https://\1/\2/\3/blob/%r0/%pt%{#L|}ls%{-L|}le',
\       'root': 'https://\1/\2/\3/tree/%r0/',
\       'blame': 'https://\1/\2/\3/blame/%r0/%pt%{#L|}ls%{-L|}le',
\       'compare': 'https://\1/\2/\3/compare/%h1...%h2',
\     },
\   ],
\   'gitlab\.com': [
\     [
\       '\vhttps?://(%domain)/(.{-})/(.{-})%(\.git)?$',
\       '\vgit://(%domain)/(.{-})/(.{-})%(\.git)?$',
\       '\vgit\@(%domain):(.{-})/(.{-})%(\.git)?$',
\       '\vssh://git\@(%domain)/(.{-})/(.{-})%(\.git)?$',
\     ], {
\       '_': 'https://\1/\2/\3/blob/%r0/%pt%{#L|}ls%{-L|}le',
\       'root': 'https://\1/\2/\3/tree/%r0/',
\       'blame': 'https://\1/\2/\3/blame/%r0/%pt%{#L|}ls%{-L|}le',
\       'compare': 'https://\1/\2/\3/compare/%h1...%h2',
\     },
\   ],
\   'bitbucket\.org': [
\     [
\       '\vhttps?://(%domain)/(.{-})/(.{-})%(\.git)?$',
\       '\vgit://(%domain)/(.{-})/(.{-})%(\.git)?$',
\       '\vgit\@(%domain):(.{-})/(.{-})%(\.git)?$',
\       '\vssh://git\@(%domain)/(.{-})/(.{-})%(\.git)?$',
\     ], {
\       '_': 'https://\1/\2/\3/src/%r0/%pt%{#cl-|}ls',
\       'root': 'https://\1/\2/\3/commits/%r0',
\       'blame': 'https://\1/\2/\3/annotate/%r0/%pt',
\       'compare': 'https://\1/\2/\3/diff/%pt?diff1=%h1&diff2=%h2',
\     },
\   ],
\   '.*\.visualstudio\.com': [
\     [
\       '\vhttps?://(%domain)/(.{-})/_git/(.{-})$',
\     ], {
\       '_': 'https://\1/\2/_git/\3/?path=%pt&version=GB%r0%{&line=|}ls%{&lineEnd=|}le',
\       'root': 'https://\1/\2/_git/\3/?version=GB%r0',
\     },
\   ],
\   'sfd.git.backlog.jp': [
\   [
\     '\vsfd\@%domain:/(.{-})/(.{-})%(\.git)?$',
\   ], {
\     'root':  'https://sfd.backlog.jp/git/\1/\2/tree/%r1/',
\     '_':     'https://sfd.backlog.jp/git/\1/\2/blob/%r1/%pt%{#|}ls%{-}le',
\     'exact': 'https://sfd.backlog.jp/git/\1/\2/blob/%h1/%pt%{#|}ls%{-}le',
\   },
\ ],
\})