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,28 +24,55 @@ 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`
```
Foo(
wibble,
wobble,
wubble
)
```
Specifies the style in which arguments should be wrapped.
*Bx-style* argument wrapping:
`'default'` argument wrapping:
```
Foo(wibble
, wobble
, wubble
```
Foo(
wibble,
wobble,
wubble
)
```
```
`'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 ##

View File

@ -35,26 +35,47 @@ 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
Foo(
wibble,
wobble,
wubble
)
Specifies the style in which arguments should be wrapped.
Bx-style argument wrapping:
'default' argument wrapping:
Foo(wibble
, wobble
, wubble
Foo(
wibble,
wobble,
wubble
)
'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*