prevent vim auto new lines - 08-13-20
Sometimes when typing vim will automatically start a newline. This is an expected behavior but at times can be really annoying. Ex working with macros, you can recored one on a short line that breaks on longer lines 😟. The amount of text before vim will break to new line while typing is controlled via the textwidth setting. So a fix is pretty simple. If don’t want the behavior just set textwidth to a big number. ex:
: set tw=500
Here is a asciicast of the problem and solution in action:
demo of setting tw
\- [
vim
]