lambdalisue / vim-gina

👣 Asynchronously control git repositories in Neovim/Vim 8
http://www.vim.org/scripts/script.php?script_id=5531
MIT License
689 stars 27 forks source link

gina-custom-command issue #254

Closed zachliu closed 4 years ago

zachliu commented 4 years ago

call gina#custom#command#option('commit', '--verbose') now generates an error: E117: Unknown function: gina#custom#command#option

lambdalisue commented 4 years ago

Please give me a minimal vimrc and environment information to reproduce your issue.

zachliu commented 4 years ago

I'm using neovim 0.3.8, here is the minimal init.vim

" General: Vim packages: vim-packager {{{

function PackInit() abort
  packadd vim-packager
  call packager#init()

  call packager#add('git@github.com:kristijanhusak/vim-packager', { 'type': 'opt' })

  " Git:
  call packager#add('git@github.com:lambdalisue/gina.vim')
endfunction

command! PackInstall call PackInit() | call packager#install()
command! -bang PackUpdate call PackInit() | call packager#update({ 'force_hooks': '<bang>' })
command! PackClean call PackInit() | call packager#clean()
command! PackStatus call PackInit() | call packager#status()
command! -bang PU call PackInit() | call packager#clean() | call packager#update({ 'force_hooks': '<bang>' })

" }}}
" Plugin: Gina {{{

for gina_cmd in ['branch', 'changes', 'log', 'commit', 'status']
  call gina#custom#command#option(gina_cmd, '--opener', 'tabedit')
endfor

for gina_cmd in ['diff']
  call gina#custom#command#option(gina_cmd, '--opener', 'vsplit')
endfor

call gina#custom#command#option('commit', '--verbose')
call gina#custom#command#option('branch', '--verbose|--all')

" }}}
lambdalisue commented 4 years ago

Please make a minimal vimrc. Start from the following

" How to use this vimrc.min
" vim -u ~/vimrc.min
" nvim -u ~/vimrc.min
if has('vim_starting')
  set nocompatible
endif

" Rewrite it to path/to/your/gina.vim
set runtimepath+=~/.ghq/github.com/lambdalisue/gina.vim

filetype plugin indent on
syntax on
zachliu commented 4 years ago

oh sorry, i thought you meant my own minimal .vimrc

zachliu commented 4 years ago

it seems the issue is with the vim-packager i'm using, i just switched from vim-plug (no problems with gina) to vim-packager, and i found out that i had to do

set runtimepath+=~/.config/nvim/pack/packager/start/gina.vim

manually :thinking: otherwise i got those errors

although it should be an issue within vim-packager, it's only causing problem with gina

lambdalisue commented 4 years ago

https://github.com/kristijanhusak/vim-packager/issues/17

although it should be an issue within vim-packager, it's only causing problem with gina

As long as set runtimepath+=... works, it's not gina's issue thus I close this.

zachliu commented 4 years ago

thanks anyway :smile_cat: