vimdoc
vimdoc copied to clipboard
Don't wrap long lines in literal blocks
Hi, thanks for this tool :)
We are trying to include some example mappings in the documentation:
" Phpactor does not assume any mappings automatically, the following mappings
" are available for you to copy: >
"
" augroup PhpactorMappings
" au!
" ...
" au FileType php nmap <buffer> <Leader>cc :PhpactorClassNew<CR>
" au FileType php nmap <buffer> <silent> <Leader>ee :PhpactorExtractExpression<CR>
" au FileType php vmap <buffer> <silent> <Leader>ee :<C-u>PhpactorExtractExpression<CR>
" au FileType php vmap <buffer> <silent> <Leader>em :<C-u>PhpactorExtractMethod<CR>
" augroup END
" <
But the longer lines wrap:
au FileType php nmap <buffer> <Leader>cc :PhpactorClassNew<CR>
au FileType php nmap <buffer> <silent> <Leader>ee
:PhpactorExtractExpression<CR>
au FileType php vmap <buffer> <silent> <Leader>ee
:<C-u>PhpactorExtractExpression<CR>
au FileType php vmap <buffer> <silent> <Leader>em
:<C-u>PhpactorExtractMethod<CR>
Is it / can it be possible to disable wrapping in > < blocks?
Agreed, looks like a bug that those are wrapping. Literal blocks are supported but apparently don't override the normal text wrapping.
As a workaround, consider just using line continuations and keeping the lines below standard column width so they don't overflow:
" are available for you to copy: >
"
" augroup PhpactorMappings
" au!
" ...
" au FileType php nmap <buffer> <Leader>cc :PhpactorClassNew<CR>
" au FileType php nmap <buffer> <silent> <Leader>ee
" \ :PhpactorExtractExpression<CR>
" au FileType php vmap <buffer> <silent> <Leader>ee
" \ :<C-u>PhpactorExtractExpression<CR>
" au FileType php vmap <buffer> <silent> <Leader>em
" \ :<C-u>PhpactorExtractMethod<CR>
" augroup END
" <
That's better style anyway.
Ah, good suggestion, thanks :)