Skip to content

Instantly share code, notes, and snippets.

@tamago324
Last active April 20, 2020 04:51
Show Gist options
  • Save tamago324/3e97fc812d4a51154adfb19e00b10c49 to your computer and use it in GitHub Desktop.
Save tamago324/3e97fc812d4a51154adfb19e00b10c49 to your computer and use it in GitHub Desktop.
Only github.com
let g:Lf_Extensions = get(g:, 'Lf_Extensions', {})
function! LfExt_ghq_accept(line, args) abort
let l:path = $GHQ_ROOT . '/github.com/' . a:line
execute 'tabe | tcd ' . l:path
endfunction
function! LfExt_ghq_format_line(line, args) abort
return a:line[11:]
endfunction
let g:Lf_Extensions.ghq = {
\ 'source': {'command': 'ghq list'},
\ 'accept': 'LfExt_ghq_accept',
\ 'format_line': 'LfExt_ghq_format_line',
\}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment