Ⅰ. 插件描述
Recover removed files made ease for neovimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'neoclide/keep-nvim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'neoclide/keep-nvim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'neoclide/keep-nvim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/neoclide/keep.nvim
Ⅳ. 文档说明
# Keep.nvim
Save file content to redis for later restore after saving the file.
Your files could be accidently removed (by something like rm -rf git reset),
you can't get it back easily unless you have swap file, but no one want to have
swap file in their code base, so keep.nvim comes for help, it automatic store
file content associate with file path into redis, and you could restore them by
a simple command.
Prerequirement
Installation
Take vim-plug for example:
Plug 'neoclide/keep.nvim', {do: 'npm install'}
Run :UpdateRemotePlugins in vim after installation.
Usage
Denite keepfind removed files that stored in keep based on CWD, you can do
resetaction to restore the file. You should have
dentie.nvim installed to use this
feature
:KeepRestore [filepath]restore the content of current file or filepath
resolved from CWD of neovim.KeepRemovedFiles([directory])a helper function to get removed files array
- on directory (or current cwd if not specified)
Configuration
g:nvim_keep_redis_host, default to127.0.0.1g:nvim_keep_redis_port, default to6379g:nvim_keep_redis_expire, default to5*24*3600(5 days)