Translation of words in Guim

How to make Gvim word wrap so that you don’t break words in the middle?

+41
vim word-wrap
Apr 13 '09 at 14:58
source share
6 answers

There seems to be a solution on the Internet anyway.

:set formatoptions=l :set lbr 

Link: http://vim.wikia.com/wiki/Word_wrap_without_line_breaks

+52
Apr 13 '09 at 15:16
source share

You can

 :set nowrap 

to allow huge lines to scroll the edge of your screen. But tw is probably the best way to go.

+13
Apr 13 '09 at 15:06
source share
 :set tw=78 

sets the width of the text to 78 characters. You can use "[motion] gq" to rewrap some text.

+5
Apr 13 '09 at 15:01
source share

You can

 :set wrap linebreak nolist 
+3
Dec 23 '14 at 21:21
source share

I use the following settings to wrap long lines for things like markup files.

 :set wrap :set linebreak :set nolist " list disables linebreak :set textwidth=0 :set wrapmargin=0 

Source: http://vim.wikia.com/wiki/Word_wrap_without_line_breaks

0
Feb 03 '16 at 15:12
source share

You can also use wrapmargin, whose description is defined as:

 Number of characters from the right window border where wrapping starts. When typing text beyond this limit, an <EOL> will be inserted and inserting continues on the next line. 
-one
Apr 13 '09 at 15:14
source share



All Articles