restore_view.vim


Ⅰ. 插件描述

A plugin for automatically restoring file's cursor position and folding

Ⅱ. 基本信息

创建日期:  2012-04-18
使用用户:  287
Github星:  31
插件作者:  Yichao Zhou

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

This is plugin for automatically restore one file's cursor position and folding information after restart vim.

This is a simple script to autosave cursor position and fold
information using vim\'s mkview.  Although you can easily do this job by
just add serveral line to {.,_}vimrc, write a script plugin can make it
more clean and nice.  We assume you use a new enough vim to enjoy
these feature. Hope you love it:)
                                                                        
Views are only be saved when you save/write a file or EXIT VIM.
    
Suggested Setting:
Please put them in you vimrc:
set viewoptions=cursor,folds,slash,unix
" let g:skipview_files = ['*.vim']
                                                                  
Set it in a plugin file looks dirty to me.  So you\'d better do it your
self.  This only keywords not in viewoptions is \"options\". I believe it
does not belong to a view.  If you think you need it, feel free to
put it in.  If you do not want views of some files to be saved, please
set g:loaded_restore_view. The longer time you use, the bigger view
folder you will have.  So if you use UNIX environment, you may need to
use cron to do some clean job.

添加新评论