Ⅰ. 插件描述
Save files atomically with ordinary "w" commandⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/atomic-save'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/atomic-save'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/atomic-save'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/Atomic-Save
Ⅳ. 文档说明
This is an atomic save function for vim. IOW, this is an atomic write ('w') function for vim. It makes sure that there is always a fully-written copy of the file in place to be read by other programs. It uses the system 'mv' since vim's rename() function removes the destination file rather than atomically replacing it.
To use it, you enable it as described below, and then 'w' your file like normal.
NOTE: if using windows, see the note below.