Closed Flimm closed 3 years ago
I use Fugitive litterally every day and :Gdiff
together with Ledger for every penny that moves in my finances and I've never seen this error or anything like it. Can you still replicate this? Can you replicate it with a MWE with just these two plugins involved?
This ZSH script should do the heavy lifting to setup such an environment, but it works for me with both VIM and NeoVIM:
#!/usr/bin/env zsh
set -e
: ${1:=nvim}
mktemp -d | read TMPDIR
pwd | read WD
trap 'rm -rf $TMPDIR' EXIT SIGHUP SIGTERM
test -f fugitive.zip ||
wget https://github.com/tpope/vim-fugitive/archive/master.zip -O fugitive.zip
test -f vim-ledger.zip ||
wget https://github.com/ledger/vim-ledger/archive/master.zip -O vim-ledger.zip
cd $TMPDIR
unzip $WD/fugitive.zip
unzip $WD/vim-ledger.zip
git init
cat << LEDGER > test.ledger
2020-01-01 Person
Expenses \$6.00
Cash
LEDGER
git add test.ledger
git commit -m "Original state"
sed -i -e 's/6/8/' test.ledger
cat << VIMRC | $1 -Nu /dev/stdin test.ledger "+Gdiff"
filetype off
set rtp+=vim-fugitive-master
set rtp+=vim-ledger-master
filetype plugin indent on
syntax enable
VIMRC
Thanks for this response. It is helpful. I only rarely experience this issue any more. I wish I could say it's gone away completely but it hasn't. I experience it now maybe once a week. I'm not sure what is happening, but if I figure it out, I'll get back to you.
When I run
:Gdiff
from vim fugitive in order to see a diff in Git, I get this error:I've never experienced an error like this with Vim Fugitive, and the error mentions vim-ledger, so I'm pretty sure the bug is with vim-ledger.
I'm using
hledger
and I don't have aledger
binary installed. I'm using the latest version of vim-fugitive from the GitHub repo at the time of writing.