在vim中禁用交换文件创建 [英] Disabling swap files creation in vim
本文介绍了在vim中禁用交换文件创建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有一种方法可以在Vim中禁用 .swp
文件的创建?或至少将它们全部创建在一个地方,以便我可以轻松找到和删除它们。
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.
当我同时编辑父目录时发现它们特别烦人。当然,我知道我可以使用find -exec查找和删除它们。但是我想要一个更实用的解决方案。
I find them especially annoying when I copy the parent directory while editing at the same time. Of course I know that I can use find -exec to find and delete them. But I want a more practical solution.
推荐答案
要在vim中禁用交换文件,请输入
To disable swap files from within vim, type
:set noswapfile
禁用永久交换文件,将以下内容添加到您的〜/ .vimrc
文件
To disable swap files permanently, add the below to your ~/.vimrc
file
set noswapfile
有关更多详细信息,请参见交换文件上的视频文档
For more details see the Vim docs on swapfile
这篇关于在vim中禁用交换文件创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文