Commits

ZyX_I committed 9311354

@%aurum/drivers/common/hypsites: Added support for gists.

Comments (0)

Files changed (1)

autoload/aurum/drivers/common/hypsites.vim

 unlet s:hgwebdict s:pkbase s:cpbase s:cbssh s:cbhttps
 "▶1 git
 "  ssh://git@github.com:MarcWeber/vim-addon-manager / git://github.com/MarcWeber/vim-addon-manager
+"  git://gist.github.com/1569146.git / ssh://git@gist.github.com:1569146.git
 "  git://vimpluginloader.git.sourceforge.net/gitroot/vimpluginloader/vam-test-repository
 "       / ssh://zyxsf@vimpluginloader.git.sourceforge.net/gitroot/vimpluginloader/vam-test-repository
 "  git://repo.or.cz/test2.git / http://repo.or.cz/r/test2.git /
 "  git://git.kitenet.net/mr.git / http://git.kitenet.net/git/mr.git
 "       / ssh://git.kitenet.net/srv/git/mr.git
 "  (unable to clone with hg-git) https://code.google.com/p/tortoisegit/
+"
+" Warning: when using gists you have a choice: either point to a specific file 
+"          or to a specific line in whichever file comes first. I have chosen 
+"          to use specific file making it impossible to point to a line using 
+"          :AuH. This means currently gist has a problem: if there are two 
+"          files in gist, then there are two spans having same id.
+"          It also seems impossible to download bundle with older version of 
+"          gist.
 let s:ghpath='substitute(path, "\\v^[:/]|\\.git$", "", "g")'
 let s:roproj='matchstr(path, ''\v\/@<=[^/]{-1,}%(%(\.git)?\/*$)@='').".git"'
 let s:robase='"http://".domain."/w/".'.s:roproj
 \['domain is? "bitbucket.org"', s:bbdict],
 \['domain is? "github.com"',
 \ {     'html': '"https://".domain."/".'.s:ghpath.'."/blob/".hex."/".file',   'hline': '"L".line',
-\                                                                             'hlines': '"L".line1."-L".line2',
+\                                                                            'hlines': '"L".line1."-L".line2',
 \        'raw': '"https://".domain."/".'.s:ghpath.'."/raw/". hex."/".file',
 \   'annotate': '"https://".domain."/".'.s:ghpath.'."/blame/". hex."/".file', 'aline': '"LID".line',
 \   'filehist': '"https://".domain."/".'.s:ghpath.'."/commits/".hex."/".file',
 \        'log': '"https://".domain."/".'.s:ghpath.'."/commits"',
 \      'clone': '"git://".domain."/".'.s:ghpath,
 \       'push': '"ssh://git@".domain.":".'.s:ghpath.'.".git"',}],
+\['domain is? "gist.github.com"',
+\ {     'html': '"https://".domain."/".'.s:ghpath.'."/".hex."#file_".tr(file, "-", "_")',
+\        'raw': '"https://".domain."/raw/".'.s:ghpath.'."/".hex."/".file',
+\     'bundle': '"https://".domain."/gists/".'.s:ghpath.'."/download"',
+\  'changeset': '"https://".domain."/".'.s:ghpath.'."/".hex',
+\        'log': '"https://".domain."/".'.s:ghpath.'."#revisions"',
+\      'clone': '"git://".domain."/".'.s:ghpath.'.".git"',
+\       'push': '"ssh://git@".domain.":".'.s:ghpath.'.".git"',
+\ }],
 \['domain =~? "\\Vgit.sourceforge.net\\$"',
 \ {     'html': '"http://".domain."/git/gitweb.cgi?p=".path[9:].";a=blob;hb=".hex.";f=".file', 'hline': '"l".line',
 \        'raw': '"http://".domain."/git/gitweb.cgi?p=".path[9:].";a=blob_plain;hb=".hex.";f=".file',
 \   'filehist': s:svngcbase.'."/source/list?path=/".'.s:svngcfile.'."&r=".hex',
 \        'log': s:svngcbase.'."/source/list"',
 \      'clone': 'url',}],
-\['domain is? "svn.gna.org',
+\['domain is? "svn.gna.org"',
 \ {     'html': '"http://".domain."/viewvcs".path[4:]."/".file."?view=markup&revision=".hex',   'hline': '"l".line',
 \        'raw': '"http://".domain."/viewvcs/*checkout*".path[4:]."/".file."?view=markup&revision=".hex',
 \   'annotate': '"http://".domain."/viewvcs".path[4:]."/".file."?annotate=".hex',               'aline': '"l".line',
 unlet s:hyp
 "▶1
 call frawor#Lockvar(s:, '_pluginloaded')
-" vim: ft=vim ts=4 sts=4 et fmr=▶,▲
+" vim: ft=vim ts=4 sts=4 et fmr=▶,▲ tw=0