Extended dimension expression (#68)

This commit is contained in:
Junegunn Choi
2015-05-05 14:36:31 +09:00
parent 26f06e2272
commit eed886c0c8
3 changed files with 97 additions and 37 deletions

View File

@@ -23,7 +23,7 @@ Usage
- `:Goyo`
- Toggle Goyo
- `:Goyo [width]`
- `:Goyo [dimension]`
- Turn on or resize Goyo
- `:Goyo!`
- Turn Goyo off
@@ -31,12 +31,33 @@ Usage
The window can be resized with the usual `[count]<CTRL-W>` + `>`, `<`, `+`,
`-` keys.
### Dimension expression
The expected format of a dimension expression is
`[WIDTH][XOFFSET][x[HEIGHT][YOFFSET]]`. `XOFFSET` and `YOFFSET` should be
prefixed by `+` or `-`. Each component can be given in percantage.
```vim
" Width
Goyo 120
" Height
Goyo x30
" Both
Goyo 120x30
" In percentage
Goyo 70%x50%
" With offsets
Goyo 50%+25%x50%-25%
```
Configuration
-------------
- `g:goyo_width` (default: 80)
- `g:goyo_margin_top` (default: 4)
- `g:goyo_margin_bottom` (default: 4)
- `g:goyo_linenr` (default: 0)
### Callbacks