Vim plugin: Text objects for functions
Vim script Java C Ruby
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
after/ftplugin Bump up version to 0.4.0 May 3, 2014
autoload/textobj Bump up version to 0.4.0 May 3, 2014
doc Bump up version to 0.4.0 May 3, 2014
plugin/textobj Bump up version to 0.4.0 May 3, 2014
t java: Add tests on "aF" and "iF" May 1, 2014
.gitignore Ignore intermediate files used by the toolchain Apr 1, 2014
.travis.yml Use MRI 2.1.0 to run tests on Travis CI Apr 1, 2014
Gemfile Use vim-flavor 2.0 or later Apr 1, 2014
README.md Update documents on "aF" and "iF" May 1, 2014
Rakefile
VimFlavor Declare dependencies Jan 18, 2013

README.md

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: