Disabling swap files creation in vim

后端 未结 10 1338
孤独总比滥情好
孤独总比滥情好 2020-12-12 09:06

Is there a way to disable .swp files creation in vim? or at least create them all in one place so I can find and delete them easily.

I find them especia

10条回答
  •  Happy的楠姐
    2020-12-12 09:31

    For anyone trying to set this for Rails projects, add

    set directory=tmp,/tmp
    

    into your

    ~/.vimrc
    

    So the .swp files will be in their natural location - the tmp directory (per project).

提交回复
热议问题