Wrapping Lines in Vim at Character or Word Boundaries
I have my ~/.vimrc
file set up to enable wrapping lines at word boundaries instead of characters, and this is usually the behavior I want. However, occasionally I want to copy/paste some content from a file and I don’t want the extra spaces that vim adds for visual appeal to be there. This leads me on the same exercise of ducking for how to configure line wrapping in vim, not finding what I need, and digging through the :help
until I find it. I’ve had it and I’m just creating the article I need, and hopefully next time when I search for “how to wrap lines at character boundaries” this will come up!
TL;DR:
Turn on wrapping at word boundary:
Turn on wrapping at character boundary:
Turn off all wrapping (Back to default settings):