Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim is slow when editing files over samba

I have a windows host running ubuntu in vmware. I set up ubuntu to export a samba share so that I could use gvim on windows. When editing files over this connection visual mode gets really slow. I have also noticed bufexplorer gets slow during this time too. Neither of these are slow when I am editing files on the windows host.

What can I do to improve performance?

like image 766
Tim Avatar asked Jan 21 '11 01:01

Tim


People also ask

How can I make Vim run slower?

Overkill, perhaps. Now, you should do things that make vim act slowly. They are being profiled in the background. Once you have concluded, end the profiling. And quit vim. Now, read the profile.log file and see what's slow. Note that this is for slow running inside of vim. If vim is slow to start up (a different problem), you should start vim with

Is Vim slower than Geany?

It looks like Vim is slower than Geany. And it is a very noticeable difference. When I hold any key in Geany it prints it without any lag (llllllll for example). In Vim it is slow and jumping. Autocomplete in vim is horrible in comparison to Geany.

Why does Vim keep saying %s/^/newstring-/G?

But that was just an example for illustrating the problem, and executing ":%s/^/newstring-/g" is not the main issue. The reason for the warning message is that Vim, in its default configuration, is an interactive application which expects to communicate using a particular terminal configuration.

Why can't I use Vim with profile?

Using profile requires vim to be compiled with +profile, which happens to be true for many (but not all) vim binaries provided on distributions. You might try compiling your own vim, or installing a more featurefull binary.


1 Answers

The first thing I would try is setting the directory option (see :help directory) to a local directory. That way all the swap file operations won't go over the network.

like image 128
Karl Bielefeldt Avatar answered Oct 06 '22 08:10

Karl Bielefeldt