vim-beancount doesn't work if .vimrc present

160 views
Skip to first unread message

jfs...@gmail.com

unread,
Dec 10, 2016, 9:43:17 PM12/10/16
to Beancount
Hello All,

I'm running beancount under OSX El Capitan,10.11.6. , Python 3.5.2.  Using Vim 7.4 Mac OSX version.  I downloaded the zip and manually copied the files to my .vim directory.  The folding worked, but I did not try the completion.  After about a month not opening my file, I opened it again and noticed the folding was not working.  Neither was the completion.  I did have syntax highlighting, and that showed up when I did :set in vim.  After some looking and thinking, I realized my .vimrc file was newer than the last time I edited.  I tried commenting out settings, but even with everything commented out I had no folding.  I renamed the .vimrc to vimrc, and voila, my folding came back.  I issued "touch .vimrc" to create an empty .vimrc, and no more folding.  Deleted this empty .vimrc, and folding returns.

Is the .vimrc affecting the vim-beancount, or is it because I copied the files manually and did not use pathogen or vundle?

While trying to solve the folding problem I looked at the contents of the .vim files.  It looks like there are more features besides what is documented.  If so, it would be nice to know what they are.  Does the AlignCommodity have a hotkey, or does the user have to assign one?

Thanks,

Jonathan Salles  


Nathan Grigg

unread,
Dec 11, 2016, 11:37:28 PM12/11/16
to bean...@googlegroups.com
On Dec 10, 2016, at 6:43 PM, jfs...@gmail.com wrote:

Hello All,

I'm running beancount under OSX El Capitan,10.11.6. , Python 3.5.2.  Using Vim 7.4 Mac OSX version.  I downloaded the zip and manually copied the files to my .vim directory.  The folding worked, but I did not try the completion.  After about a month not opening my file, I opened it again and noticed the folding was not working.  Neither was the completion.  I did have syntax highlighting, and that showed up when I did :set in vim.  After some looking and thinking, I realized my .vimrc file was newer than the last time I edited.  I tried commenting out settings, but even with everything commented out I had no folding.  I renamed the .vimrc to vimrc, and voila, my folding came back.  I issued "touch .vimrc" to create an empty .vimrc, and no more folding.  Deleted this empty .vimrc, and folding returns.

Is the .vimrc affecting the vim-beancount, or is it because I copied the files manually and did not use pathogen or vundle?

It should work fine copying the files manually (although pathogen or vundle make it easier to update to newer versions), but you seem to be in a strange state. I would recommend using "set foldmethod?" and "set filetype?" to see what is the difference between the two states. There are certainly some expected behavior differences in vim between a non-existent vimrc, but I none that I suspect of causing this issue.


While trying to solve the folding problem I looked at the contents of the .vim files.  It looks like there are more features besides what is documented.  If so, it would be nice to know what they are.  Does the AlignCommodity have a hotkey, or does the user have to assign one?


By default, no hotkeys are provided for AlignCommodity, but some suggestions are in the docs. 


Thanks,

Jonathan Salles  



--
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/70afb319-34cd-472e-bc2b-4a0471843c4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jonathan Salles

unread,
Feb 23, 2017, 8:33:53 PM2/23/17
to Beancount
Hi All,

Well, finally got back to this, and did some reading up on Vim and Vimscripts (highly recommend "Learn Vimscript the Hard Way" at http://learnvimscriptthehardway.stevelosh.com/) and looked at the documentation and scripts some more.  I changed some things in my .vimrc, and now completion and alignment work.  The last line in the doc piqued my curiosity, and Mr. Google informed me it was a modeline, and now I have the import set one as a header.

Thanks for creating the VimScript!!

Jonathan
Reply all
Reply to author
Forward
0 new messages