vim-foldfocus


Ⅰ. 插件描述

✂️ A vim plugin for isolating a particular piece of text into its own separated context.

Ⅱ. 基本信息

创建日期:  2014-08-22
使用用户:  7
Github星:  29
插件作者:  Luis Vasconcellos

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-foldfocus #

What is it?

A plugin that extracts the text from the current fold level and outputs it into a new temporary buffer.

The ideia behind this plugin is to separate a specific piece of code in to its own context (buffer). This is useful when you are trying to understand a particular messy piece of code, and you want to be able to search words using /, *, # without leaving the context of the code that you are exploring.

Also, if you do change anything in the temp buffer, those changes will automatically be syncronized with the original buffer.

Installation

Using vundle, add this to your .vimrc:

Bundle 'lfv89/vim-foldfocus'

Than run:

:BundleInstall

Usage

All you have to do is to map the function to a key of your choice.

If you want to focus in place, use:

nmap <CR> :call FoldFocus('e')<CR>

In this case, you can hit q to leave the temporary buffer and get
back to the original one.

If you want to focus in a side buffer, use:

nmap <Leader><CR> :call FoldFocus('vnew')<CR>

Of course, you are free to change the mapping to use whatever keys you want.

Me

luisvasconcellos.com

Feel free to talk to me about anything related to this project.

添加新评论