cleanswap


Ⅰ. 插件描述

capture useful text from, and delete, all the vim swap files in ~/.vim/swap

Ⅱ. 基本信息

创建日期:  2005-01-22
使用用户:  1
Github星:  1
插件作者:  Chris Houser

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/cleanswap'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/cleanswap'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/cleanswap'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/cleanswap

Ⅳ. 文档说明

This is a super-simple bash script for cleaning up my ~/.vim/swap directory.  I have vim put all its swap files there (set directory=~/.vim/swap) so I can find them in one place.

When I run this script, it recovers using each swap file and compares the results against the current version of the file.  If there is no difference, the swap file is automatically deleted. If there are differences, vimdiff is launched so I can recover any changes saved only in the swap file.  When the script is don running, all my swap files are gone.

Warning: This script has only been tested on Linux, and that only a couple times. It may accidentally delete any file on your system.  If you have any other vim sessions running, I assume bad things will happen if you also run this script.  Use at your own risk!

添加新评论