Skip to content

Commit

Permalink
Update documents on "aF" and "iF"
Browse files Browse the repository at this point in the history
  • Loading branch information
kana committed May 1, 2014
1 parent 9aa6888 commit 6b8234a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Expand Up @@ -12,6 +12,13 @@ For example,
* `daf` to <strong>D</strong>elete <strong>A</strong> <strong>F</strong>unction, and
* `vif` to <strong>V</strong>isually select the code <strong>I</strong>nside a <strong>F</strong>unction.

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 <strong>Y</strong>ank <strong>A</strong> <strong>F</strong>unction 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:
Expand Down
18 changes: 18 additions & 0 deletions doc/textobj-function.txt
Expand Up @@ -47,6 +47,13 @@ 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 textobj-function before editing. By default,
the following languages are supported:
Expand Down Expand Up @@ -94,6 +101,8 @@ mode:
----- --------------------------- ~
*af* |<Plug>(textobj-function-a)|
*if* |<Plug>(textobj-function-i)|
*aF* |<Plug>(textobj-function-A)|
*iF* |<Plug>(textobj-function-I)|

*g:textobj_function_no_default_key_mappings*
If you don't need these key mappings, define a global variable
Expand Down Expand Up @@ -127,6 +136,15 @@ modes.
a function are not included e.g. its name, its
arguments and so forth).

<Plug>(textobj-function-A) *<Plug>(textobj-function-A)*
Similar to |<Plug>(textobj-function-a)|, but select
also the leading or trailing blank lines like |ap|.

<Plug>(textobj-function-I) *<Plug>(textobj-function-I)*
Same as |<Plug>(textobj-function-a)|.
While |<Plug>(textobj-function-A)| is like |ap|,
<Plug>(textobj-function-I) is like |ip|.




Expand Down

0 comments on commit 6b8234a

Please sign in to comment.