autoswap.vim


Ⅰ. 插件描述

Switch to open editor window instead of asking what to do with swapfile

Ⅱ. 基本信息

创建日期:  2014-04-14
使用用户:  21
Github星:  4
插件作者:  Gioele Barabucci

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Dealing with swap files is annoying. Most of the time you have to deal with a swap file because you either have the same file open in another window or it is a swap file left there by a previous crash.

This plugin does for you what you would do in these cases:

  1. Is file already open in another Vim session in some other window?
  2. If so, swap to the window where we are editing that file.
  3. Otherwise, if swapfile is older than file itself, just get rid of it.
  4. Otherwise, open file read-only so we can have a look at it and may save it.

Homepage: http://svario.it/vim-autoswap
Report issues: http://svario.it/vim-autoswap/issues

--

Damian Conway presented this plugin at OSCON 2013 in his talk "More instantly better Vim" (http://programming.oreilly.com/2013/10/more-instantly-better-vim.html).

This version has been modified to work also on Linux systems. Both Vim and GVim are supported.

The original version of this plugin (only for Mac OX) is available at http://is.gd/IBV2013, together with other plugins presented in the same talk.

添加新评论