Turning off splitting lines in vim

set formatoptions-=tc

See :help fo-table for more info.

Wim's suggestion of set textwidth=0 should have the same effect, though a lot of annoying filetype plugins will undo that for you. (Ugh.)


I assume you are talking about the feature where long lines are visually "wrapped" to be shown on multiple lines. (This does not interfere with the content of the file though, it is just the way the text is presented visually.) Issue the following command to turn of this feature:

:set nowrap

If you are seeing that vim is really splitting lines automatically (not just visually but by actually inserting line breaks) then you must have configured vim to limit text width; this is not enabled by default. In that case you can disable it again like this:

:set textwidth=0

Edit your .vimrc configuration file to make these changes permanent.

Tags:

Vim