Updating documentation

This commit is contained in:
Alex Yatskov 2015-01-28 14:09:04 +09:00
parent ae18d6d987
commit 0c89e2ef6b
2 changed files with 79 additions and 31 deletions

View File

@ -24,11 +24,14 @@ information.
`nnoremap <silent> <leader>w :call argwrap#toggle()<CR>`
The `toggle` function receives an optional style argument, which may be either `"default"` or `"bx"`. Not providing
an explicit value is equivalent to specifying the `"default"` setting. The style determines the wrapping behavior
as seen below:
3. You can customize the wrapping/unwrapping behavior of this extension by setting values for any of the following
optional global variables in your `.vimrc` file:
*Default-style* argument wrapping:
* `g:argwrap_wrap_style`
Specifies the style in which arguments should be wrapped.
`'default'` argument wrapping:
```
Foo(
@ -38,7 +41,7 @@ information.
)
```
*Bx-style* argument wrapping:
`'bx'` argument wrapping:
```
Foo(wibble
@ -47,6 +50,30 @@ information.
)
```
* `g:argwrap_padded_braces`
Specifies which brace types should be padded on the inside with spaces:
`''`: do not add padding for any braces (empty string):
```
[1, 2, 3]
{1, 2, 3}
```
`'['`: padding for square braces only (curly braces are not padded):
```
[ 1, 2, 3 ]
{1, 2, 3}
```
Padding can be specified for multiple brace types as follows:
```
let g:argwrap_padded_braces = '[{'
```
## Usage ##
1. Position the cursor *inside* of the scope of the parenthesis, brackets or curly braces you wish to wrap/unwrap (not

View File

@ -35,12 +35,15 @@ INSTALLATION *argwrap-installation*
nnoremap <silent> <leader>w :call argwrap#toggle()<CR>
The toggle function receives an optional style argument, which may be either
"default" or "bx". Not providing an explicit value is equivalent to
specifying the "default" setting. The style determines the wrapping behavior
as seen below:
3. You can customize the wrapping/unwrapping behavior of this extension by
setting values for any of the following optional global variables in your
.vimrc file:
Default-style argument wrapping:
* g:argwrap_wrap_style
Specifies the style in which arguments should be wrapped.
'default' argument wrapping:
Foo(
wibble,
@ -48,13 +51,31 @@ INSTALLATION *argwrap-installation*
wubble
)
Bx-style argument wrapping:
'bx' argument wrapping:
Foo(wibble
, wobble
, wubble
)
* g:argwrap_padded_braces
Specifies which brace types should be padded on the inside with spaces:
'': do not add padding for any braces (empty string):
[1, 2, 3]
{1, 2, 3}
'[': padding for square braces only (curly braces are not padded):
[ 1, 2, 3 ]
{1, 2, 3}
Padding can be specified for multiple brace types as follows:
let g:argwrap_padded_braces = '[{'
================================================================================
USAGE *argwrap-usage*