Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vim plugin failing with "Unknown function: job_start" #1

Open
ghost opened this issue Jan 9, 2018 · 1 comment
Open

vim plugin failing with "Unknown function: job_start" #1

ghost opened this issue Jan 9, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Jan 9, 2018

  1. Starting with nvim & OSX
  2. Installed plugin with vim-plug; vim-plug reported success
  3. Open .go file
  4. nvim reports:
Error detected while processing function ABCGo:
line    1:
E117: Unknown function: job_start

It appears this ticket may be relevant.

I am not a vimscript hacker, but this code change seems to fix the issue:

diff --git a/vim/plugin/abcgo.vim b/vim/plugin/abcgo.vim
index 839fda4..36f68ba 100644
--- a/vim/plugin/abcgo.vim
+++ b/vim/plugin/abcgo.vim
@@ -33,7 +33,11 @@ function! ABCGoBackground(channel, reports)
 endfunction

 function! ABCGo()
-  call job_start($GOPATH . "/bin/abcgo -format raw -path " . expand("%:p"), {'callback': 'ABCGoBackground', 'mode': 'raw'})
+  if has("nvim")
+    call jobstart($GOPATH . "/bin/abcgo -format raw -path " . expand("%:p"), {'callback': 'ABCGoBackground', 'mode': 'raw'})
+  else
+    call job_start($GOPATH . "/bin/abcgo -format raw -path " . expand("%:p"), {'callback': 'ABCGoBackground', 'mode': 'raw'})
+  endif
 endfunction

 augroup abcgo_autocmd
@droptheplot
Copy link
Owner

Hi @serussell,
Thank you for the issue! I didn't test it with NeoVim but looks like you're right, Vim has job_start() and NeoVim jobstart(). I'll try NeoVim and fix it soon.

Chickensoupwithrice added a commit to Chickensoupwithrice/vimwiki-sync that referenced this issue Oct 13, 2020
I'm not really a vimscript hacker yet, but I pulled these changes from droptheplot/abcgo#1
Was running into issues opening up my vimwiki on nvim with your plugin installed.
Haven't tested extensively, but it seems to do the job
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant