keep.nvim


Ⅰ. 插件描述

Recover removed files made ease for neovim

Ⅱ. 基本信息

创建日期:  2018-03-09
使用用户:  1
Github星:  2
插件作者:  neoclide

Ⅲ. 安装方法

使用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 keep find removed files that stored in keep based on CWD, you can do
    reset action 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
  1. on directory (or current cwd if not specified)

Configuration

  • g:nvim_keep_redis_host, default to 127.0.0.1
  • g:nvim_keep_redis_port, default to 6379
  • g:nvim_keep_redis_expire, default to 5*24*3600 (5 days)

添加新评论