f.vim


Ⅰ. 插件描述

Function that shows lines that do contain a given regexp. The rest is folded.

Ⅱ. 基本信息

创建日期:  2002-06-21
使用用户:  1
Github星:  1
插件作者:  Antonio Colombo

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

:call F()
This function lets you see all the lines in a file
that contain a given regular-expression.

The remaining lines are folded with the manual method,
and can be opened to see some 'nearby' line.

If no regular expression is specified, the last regular expression
specified for search is utilized.

The idea comes from the mainframe ISPF editor.

After you get your folds, you can give commands affecting only the folded lines
using:

:folddoclosed

or use:

:folddoopen

to operate only on the visible lines.

zo   to open a fold a bit
zozj to open a fold a bit and leave the cursor on the fold line
zO   to open a fold completely
zE   to open all folds

zf{motion} to close folders 'a bit more' (or to create folders)
If you have 2 adjacent folders, zf<ENTER> will 'merge' them.
In the same way a visible line can be 'added' to a nearby folder.

:call FA()
This function is similar to F() above, except instead of typing in
a regular expression, the current word the cursor is over is used as
the regular expression.

The function FA() has been prepared and added by:
Ken Huisman - ken.huisman@gmail.com

Suggested mappings:
:map <F5> :call F()<CR>
:map <F6> :normal zozj<CR>

:<Up> to recall the macro after having executed it once

editing the "f.vim" file itself:

try giving as an expression  nfold
try giving as an expression  as
try giving as an expression   as     [that is: ' as' ]
try giving as an expression  let
try giving as an expression  ^":
try giving as an expression  :fun|:endf
try giving as an expression  :endf
try giving as an expression  ^:endf

for remarks, complaints, etc. write to: azc100@gmail.com
version 05042001

添加新评论