Additional tips on formatting paragraphs

This commit is contained in:
Reed Esau
2016-07-30 18:56:58 -06:00
parent ad18a74cf0
commit 735cc3b24e

View File

@@ -271,17 +271,23 @@ Note that you need not rely on Vims autoformat exclusively and can
manually reformat paragraphs with standard Vim commands: manually reformat paragraphs with standard Vim commands:
* `gqip` or `gwip` - format current paragraph * `gqip` or `gwip` - format current paragraph
* `vipJ` - unformat (i.e., join all lines with hard line breaks) in current paragraph * `vapJgwip` - merge two paragraphs (current and next) and format
* `ggVGgq` or `:g/^/norm gqq` - format all paragraphs in buffer * `ggVGgq` or `:g/^/norm gqq` - format all paragraphs in buffer
* `:%norm vipJ` - unformat all paragraphs in buffer
Optionally, you can map these operations to underutilized keys in your Optionally, you can map these operations to underutilized keys in your
`.vimrc`: `.vimrc`:
```vim ```vim
nnoremap <silent> Q gwip nnoremap <silent> Q gwip
nnoremap <silent> <leader>Q vapJgwip
``` ```
Or you may wish to unformat, (i.e., remove hard line breaks) when using
soft line wrap.
* `vipJ` - join all lines in current paragraph
* `:%norm vipJ` - unformat all paragraphs in buffer
## Default textwidth ## Default textwidth
You can configure the textwidth to be used in **HardPencil** mode when no You can configure the textwidth to be used in **HardPencil** mode when no