You are not logged in.

#1 2013-06-15 11:39:58

A.J.Rouvoet
Member
From: Naaldwijk, The Netherlands
Registered: 2012-06-30
Posts: 37
Website

Vim weird irregular freezing behaviour

Without updating in between, vim has started to behave weirdly:

It freezes when opening certain files or files in certain directories. Not responding to any command, but showing the typed letters in the command 'area', overwriting status text.
It will do so until I 'do' something with the file, such as `mv file.tex file.tex` (even though one would think that does very little, if anything, to the file.

I removed existing backup files and e.g. cat works fine on 'frozen files'; suggesting they are not corrupt.

Anyone any idea?

Last edited by A.J.Rouvoet (2013-06-15 11:44:20)

Offline

#2 2013-06-15 11:45:20

A.J.Rouvoet
Member
From: Naaldwijk, The Netherlands
Registered: 2012-06-30
Posts: 37
Website

Re: Vim weird irregular freezing behaviour

Oh, the culprit is another vim server somewhere in the background holding on to the same file. It seems that not all file buffers are released when quiting a server with multiple buffers.

Offline

#3 2013-06-15 17:30:24

A.J.Rouvoet
Member
From: Naaldwijk, The Netherlands
Registered: 2012-06-30
Posts: 37
Website

Re: Vim weird irregular freezing behaviour

Hmm, even after I killed all vim instances it still has the same behaviour. Anyone?

Offline

#4 2013-06-15 17:41:13

opt1mus
Member
From: UK
Registered: 2011-12-31
Posts: 212
Website

Re: Vim weird irregular freezing behaviour

If you hold the last post then it's considered good form to edit that, rather than crassly bump your thread up the board.

Offline

#5 2013-06-15 18:48:14

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: Vim weird irregular freezing behaviour

Could the freezes be occurring when the swapfile is syncing?  Running iotop might tell you.  Or you can simply test by running without a swapfile – add 'set noswapfile' to your '.vimrc'.  You do risk losing some data (the last unsaved changes) if vim crashes while running without a swapfile.

A less drastic change is to switch the swapfile syncing to disk with fsync to use sync instead, with set swapsync=sync.  Or set the swapfile to a different directory from the file being edited, say '/tmp', with set dir=/tmp.

You also could try turning autoread off, set noautoread.

:help swapfile
:h swap-file
:h swapsync
:h dir
:h autoread

Offline

#6 2013-06-18 18:45:17

A.J.Rouvoet
Member
From: Naaldwijk, The Netherlands
Registered: 2012-06-30
Posts: 37
Website

Re: Vim weird irregular freezing behaviour

thisoldman wrote:

Could the freezes be occurring when the swapfile is syncing?  Running iotop might tell you.  Or you can simply test by running without a swapfile – add 'set noswapfile' to your '.vimrc'.  You do risk losing some data (the last unsaved changes) if vim crashes while running without a swapfile.

A less drastic change is to switch the swapfile syncing to disk with fsync to use sync instead, with set swapsync=sync.  Or set the swapfile to a different directory from the file being edited, say '/tmp', with set dir=/tmp.

You also could try turning autoread off, set noautoread.

:help swapfile
:h swap-file
:h swapsync
:h dir
:h autoread

I already had set noswapfile in my .vimrc

Offline

Board footer

Powered by FluxBB