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>` `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 3. You can customize the wrapping/unwrapping behavior of this extension by setting values for any of the following
an explicit value is equivalent to specifying the `"default"` setting. The style determines the wrapping behavior optional global variables in your `.vimrc` file:
as seen below:
*Default-style* argument wrapping: * `g:argwrap_wrap_style`
``` Specifies the style in which arguments should be wrapped.
Foo(
wibble,
wobble,
wubble
)
```
*Bx-style* argument wrapping: `'default'` argument wrapping:
``` ```
Foo(wibble Foo(
, wobble wibble,
, wubble 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 ## ## Usage ##

View File

@ -35,26 +35,47 @@ INSTALLATION *argwrap-installation*
nnoremap <silent> <leader>w :call argwrap#toggle()<CR> nnoremap <silent> <leader>w :call argwrap#toggle()<CR>
The toggle function receives an optional style argument, which may be either 3. You can customize the wrapping/unwrapping behavior of this extension by
"default" or "bx". Not providing an explicit value is equivalent to setting values for any of the following optional global variables in your
specifying the "default" setting. The style determines the wrapping behavior .vimrc file:
as seen below:
Default-style argument wrapping: * g:argwrap_wrap_style
Foo( Specifies the style in which arguments should be wrapped.
wibble,
wobble,
wubble
)
Bx-style argument wrapping: 'default' argument wrapping:
Foo(wibble Foo(
, wobble wibble,
, wubble 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* USAGE *argwrap-usage*