can't get vim plugin fully working

163 views
Skip to first unread message

senorsmile

unread,
Feb 15, 2017, 5:15:49 AM2/15/17
to Beancount
I use pathogen and can confirm that the plugin is loading and that syntax highlighting is working. 

However, neither folding nor autocomplete seems to work at all.  

Ctrl+X->Ctrl+O gives 
E764: Option 'omnifunc' not set


zr, zn, zj, zk... none seem to fold much of anything.  I tried a recent suggestion of using 

##
### 
###
etc.

to no avail.  

Anything special I should be doing here?

Jason Chu

unread,
Feb 15, 2017, 6:37:12 AM2/15/17
to Beancount

Can you share a simple vimrc that doesn't work? I can test it to see what's up.


--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/d3ad2958-ae08-4894-bf5a-fbc63545f64f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

shaun

unread,
Feb 15, 2017, 7:02:56 AM2/15/17
to bean...@googlegroups.com
I have simplified my ~/.vimrc to:

execute pathogen#infect()
syntax on
set foldmethod=syntax



I actually had the foldmethod commented for some reason, so that's basically working now.  The autocompletion still shows the same error.  

For the sake of completion, I also have
~/.vim/autoload/pathogen.vim
~/.vim/bundle/vim-beancount/*


Jason Chu

unread,
Feb 17, 2017, 8:59:17 PM2/17/17
to bean...@googlegroups.com
I just tried with pathogen and it didn't work.  It's odd that the filetype is detected but the omnifunc isn't being set.

Using Vundle worked well for me though.  I will fiddle more with pathogen, my guess is there's some config missing.

Jason Chu

unread,
Feb 17, 2017, 9:04:59 PM2/17/17
to bean...@googlegroups.com
Ah, you need to add:

filetype plugin indent on

You don't need the set foldmethod in there either because ftplugin/beancount.vim sets it.

shaun

unread,
Feb 18, 2017, 1:46:25 AM2/18/17
to bean...@googlegroups.com
Awesome! 

That seems to have gotten me a little closer. 


I now get the following error the first time I try to auto complete: 

Error detected while processing function beancount#complete[46]..beancount#load_accounts[3]..beancount#find_acc
ounts[1]..beancount#query_single:
line   13:
Traceback (most recent call last):

Error detected while processing function beancount#complete[46]..beancount#load_accounts[3]..beancount#find_acc
ounts[1]..beancount#query_single:
line   13:
  File "<string>", line 6, in <module>

Error detected while processing function beancount#complete[46]..beancount#load_accounts[3]..beancount#find_acc
ounts[1]..beancount#query_single:
line   13:
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py",
line 219, in check_output

Error detected while processing function beancount#complete[46]..beancount#load_accounts[3]..beancount#find_acc
ounts[1]..beancount#query_single:
line   13:
    raise CalledProcessError(retcode, cmd, output=output)

subprocess.CalledProcessError: Command '['bean-query', 'wf-credit-shaun.bean', 'select distinct account;']' ret
urned non-zero exit status 1


After which no patterns are found.  


I notice that it's referring to the system python 2.7.13.  However, I'm using pyenv to use python 3.6.  I have a .python-version set in the root of this directory.  I tried setting pyenv global 3.6.0 with the exact same results.  No clue if this is what's causing my problems or not.  

Jason Chu

unread,
Feb 18, 2017, 4:06:52 PM2/18/17
to bean...@googlegroups.com

Is your vim built with Python 3 support? If you have Python 2 only then we call bean-query to get the information, so it will have to be in your path.


Reply all
Reply to author
Forward
0 new messages