by Cyphus · 11y ago · 0 comments
Have you considered just using hard wrapping instead? Sometimes having a problem solving mindset can make one miss the more elegant solution. Since you said you don't have a strong opinion in regards to hard vs. soft wrapping, why go through the trouble of fixing an issue when you could simply make the issue irrelevant?
At this point you've already got it solved so it's a bit of a moot point, but I'm interested in your thought process here.
This solution, meanwhile, is far from inelegant:
nnoremap g gj
nnoremap k gk
That's it, once and done. Aside from setting your wrap preferences—which you would have had to do anyway with hard wraps—there's no more to be taken care of. The text will always display fluently and in full, and you will have no need to manually reformat your paragraphs using gqap whenever you make a change to them. All that need concern you is the text, not its line-by-line arrangement.(I do agree that vim-pencil is unnecessary, at least if you're only going to use one scheme for wrapping.)