textobj-function


Ⅰ. 插件描述

Vim plugin: Text objects for functions

Ⅱ. 基本信息

创建日期:  2007-02-16
使用用户:  400
Github星:  112
插件作者:  Kana Natsuno

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-textobj-function

Build Status

vim-textobj-function is a Vim plugin to text objects for functions. You can
directly target a function (af) or the code inside a function (if).
For example,

  • daf to Delete A Function, and
  • vif to Visually select the code Inside a Function.

You can also use aF to target a function with leading or trailing blank
lines like ap, or use iF to target just a function like ip.
For example,

  • yaF to Yank A Function with leading or trailing blank lines, and
  • viF to visually select a function without leading or trailing blank lines.

The syntax of a "function" is varied for each language. So that you have to
tell the syntax of a function to vim-textobj-function before editing. By
default, the following languages are supported:

  • C language
  • Java
  • Vim script
    (including vim-vspec-specific syntax)

To support new languages, see:

<!-- vim: set expandtab shiftwidth=4 softtabstop=4 textwidth=78 : -->

添加新评论