mirror of
https://github.com/preservim/vim-pencil.git
synced 2025-11-12 20:03:47 -05:00
temporarily disabled cursorwrap, as ve=onemore breaks vim-quotable
This commit is contained in:
@@ -195,9 +195,12 @@ a hard break. If you wish to retain the default Vim behavior, set the
|
|||||||
`cursorwrap` value to 0 in your `.vimrc`:
|
`cursorwrap` value to 0 in your `.vimrc`:
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
let g:pencil#cursorwrap = 1 " 0=disable, 1=enable
|
let g:pencil#cursorwrap = 0 " 0=disable, 1=enable
|
||||||
```
|
```
|
||||||
|
|
||||||
|
NOTE: temporarily disabled by default while I research related bug in
|
||||||
|
vim-quotable.
|
||||||
|
|
||||||
## Auto-detection via modeline
|
## Auto-detection via modeline
|
||||||
|
|
||||||
Will the wrapping mode be detected accurately? Maybe. But you can improve
|
Will the wrapping mode be detected accurately? Maybe. But you can improve
|
||||||
|
|||||||
@@ -140,16 +140,22 @@ function! pencil#init(...) abort
|
|||||||
setlocal virtualedit+=onemore " could break other plugins
|
setlocal virtualedit+=onemore " could break other plugins
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
"setlocal cpoptions+=q " leave cursor at position when joining two lines
|
||||||
|
|
||||||
" clean out stuff we likely don't want
|
" clean out stuff we likely don't want
|
||||||
setlocal formatoptions-=2
|
setlocal formatoptions-=2
|
||||||
setlocal formatoptions-=v
|
setlocal formatoptions-=v
|
||||||
setlocal formatoptions-=w " trailing whitespace continues paragraph
|
setlocal formatoptions-=w " trailing whitespace continues paragraph
|
||||||
|
"setlocal cpoptions-=J " allow tab to be recognized as white space following sentence
|
||||||
|
"setlocal cpoptions-=j " .!? all have same join behavior
|
||||||
|
"setlocal cpoptions-=n " exclude number from text of wrapped lines
|
||||||
else
|
else
|
||||||
setlocal autoindent< noautoindent<
|
setlocal autoindent< noautoindent<
|
||||||
setlocal list< nolist<
|
setlocal list< nolist<
|
||||||
setlocal wrapmargin<
|
setlocal wrapmargin<
|
||||||
setlocal display<
|
setlocal display<
|
||||||
setlocal formatoptions<
|
setlocal formatoptions<
|
||||||
|
"setlocal cpoptions<
|
||||||
setlocal whichwrap<
|
setlocal whichwrap<
|
||||||
setlocal virtualedit<
|
setlocal virtualedit<
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ endif
|
|||||||
if !exists('g:pencil#cursorwrap')
|
if !exists('g:pencil#cursorwrap')
|
||||||
" by default, h/l and cursor keys will wrap around hard
|
" by default, h/l and cursor keys will wrap around hard
|
||||||
" linebreaks. Set to 0 if you don't want this behavior
|
" linebreaks. Set to 0 if you don't want this behavior
|
||||||
let g:pencil#cursorwrap = 1
|
let g:pencil#cursorwrap = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" # Commands
|
" # Commands
|
||||||
|
|||||||
Reference in New Issue
Block a user