prevent vim auto new lines

13-08-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:

{{< asciicast-with-caption id="353148" title="demo of setting tw" >}}

source -- https://stackoverflow.com/questions/1272173/in-vim-how-do-i-break-one-really-long-line-into-multiple-lines

- [ vim]

all snippets