Skip to content

Instantly share code, notes, and snippets.

@rch850
Created February 23, 2012 06:21
Show Gist options
  • Save rch850/1891056 to your computer and use it in GitHub Desktop.
Save rch850/1891056 to your computer and use it in GitHub Desktop.
Open Trac
" You need https://github.com/tyru/open-browser.vim to open browser.
function! OpenTrac() "{{{
let s:id = expand('<cword>')
if s:id =~ '^[0-9]\+$'
call openbrowser#open("http://trac.example.com/trac/ticket/" . s:id)
endif
endfunction "}}}
command! OpenTrac call OpenTrac()
nmap gt :call OpenTrac()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment