vim-narrow


Ⅰ. 插件描述

Emulating emacs's narrowing feature

Ⅱ. 基本信息

创建日期:  2011-07-11
使用用户:  1
Github星:  5
插件作者:  PeterRincker

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Narrowing a region of text will copy the region into a scratch buffer in which
it can be freely manipulated. After your changes are done just write the buffer
with :w, :update, :x, or whatever is your favorite way to write a

  1. Upon writing the buffer the changes will be made to the original
  2. as well. If you have made changes that you do not want to write back

the original buffer just close the buffer with :q!.

Narrow will mark the original buffer as read only and disable modifications.
Multiple narrowed region can be taken from the same buffer. This is useful in
the case of taking the diff of two different regions in the same file. Once
all narrowed regions are closed then the original buffer will modifiable again
(assuming it started out that way).

添加新评论