preservim / vim-pencil

Rethinking Vim as a tool for writing
Other
1.58k stars 39 forks source link

SoftPencil seems doesn't work #87

Closed mgdreamingstar closed 4 years ago

mgdreamingstar commented 4 years ago

Is the soft wrap mode just wrap on screen as set wrap do? Does this plugin can do more than vim itself on soft wrap, such as set a linewidth for soft wrap other than buffer border?

alerque commented 4 years ago

Ne, it is not just an alias for set wrap. It does turn on the soft wrap mode, but it does a much of other things too including adjust how many of the navigation keystrokes work so that they default to the g visual counterparts (j becomes gj etc.). It also does things like set undo points at punctuation characters, enables various conceal behaviors, etc.

No there is no way to set a virtual width other than the buffer border (although there are ways to set the buffer width independently to be smaller than the window width if that's what you are after). There is such a thing in Hard mode, but not Soft.

mgdreamingstar commented 4 years ago

Could you tell me how to set buffer width independently?

alerque commented 4 years ago

Not off the top of my head, and it's out of scope for this issue. I do something similar using the GoYo vim plugin. You could look into the source of how that does it. Otherwise ask on vi.stackexchange.com as I believe there is a way to force the buffer width to be different than what the terminal reports, but I don't remember what it is.