0

Upon editing any file I am now seeing this:

enter image description here

In order to isolate this I have deleted all of the contents of ~/.vim or ~/.vimrc. I then consulted note here and recreated the `~/.vimrc with these contents:

if empty(glob('~/.vim/tmp'))
    silent !mkdir -p ~/.vim/tmp
endif
set directory=$HOME/.vim/tmp

That also does not resolve this issue for me.

What might be the problem here?

2
  • It's hard to say why this fails. It may be a hard drive or filesystem issue. First, please try if you see this error message without that snippet from your vimrc, e.g. try using vim --clean. If it does, check what is wrong with $HOME/.vim/tmp Perhaps you already have too many swapfiles there? So try with an empty one May 26, 2022 at 8:00
  • @ChristianBrabandt I had tried after removing everything to do with vim already including that directory May 26, 2022 at 12:25

1 Answer 1

0

The following portion of a ~/.vimrc is working for me .

" tell vim where to put swap files
if empty(glob('~/.vim/tmp'))
    silent !mkdir -p ~/.vim/tmp
endif
set dir=/Users/steve/.vim/tmp
set backupdir=/Users/steve/.vim/tmp

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.