With the textwidth option set the text written can be wrapped when we leave insert mode. If I type a line longer than my textwidth value then it will go on a new line.
e.g. with set textwidth=5 and set linebreak :
1 2 3 [4]
1 2 3
4[]
lorem ipsum dolor[Esc]
lorem
ipsum
dolor[]
[X] means: I press X where [] is.
So when entering a line of number spearated by space, at the moment I enter the 6th character (in this case the number 4) the line break.
But when I enter a sentence the line doesn't break until I quit insert mode.
Do you know what I can try/set ?
formatoptions? What's the result ofset fo?on your system? – statox Aug 07 '15 at 08:06formatoptions=tcqand without :=tcqln@Carpetsmoker : it clearly come from an option in my vimrc, thanks for the advice again. – nobe4 Aug 07 '15 at 08:09:h fo-tableindicates that the optionlisLong lines are not broken in insert mode: When a line was longer than 'textwidth' when the insert command started, Vim does not automatically format it.but as I said that might not be relevant) – statox Aug 07 '15 at 08:14lflag solved the issue. – nobe4 Aug 07 '15 at 08:16