kana / vim-textobj-function

Vim plugin: Text objects for functions
http://www.vim.org/scripts/script.php?script_id=2619
141 stars 34 forks source link

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,

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,

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:

To support new languages, see: