Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange issue in vim, code not updating

Tags:

vim

editing

I have been using my Vim setup for quite some time now, but all of a sudden the saving of code does not update the code. I use FuzzyFinder for browsing files.

Opening a file normally, i.e. as Vim from console doesnt seem to give problems.

But when I open a file through FuzzyFinder it shows the old code without changes. However, opening it through a other editor (or without the plugin) or doing git diff shows the changes.

Is it some problem caused by Git, a bug in the plugin, or maybe a cache issue?

like image 231
djd Avatar asked Jan 17 '12 09:01

djd


2 Answers

Do you try use :edit!? I think problem is buffer. Vim have buffered file and don't reload it, when you open it via Fuzzy Finder.

like image 121
Grzegorz Łuszczek Avatar answered Sep 25 '22 04:09

Grzegorz Łuszczek


Have you tried setting the autoread option in your .vimrc? It should force a reload after changes have been made.

From its help page:

When a file has been detected to have been changed outside of Vim and
it has not been changed inside of Vim, automatically read it again.
When the file has been deleted this is not done.
like image 31
David Cain Avatar answered Sep 26 '22 04:09

David Cain