Sören Bleikertz
07 Dec 2009

Soft Linebreak Hell

I prefer writing my blog posts in a proper editor rather than in some web-based form in a browser. My blog software converts my posts written in textile to html, but it will also convert the hard linebreaks introduced by my editor (vim with tw=80) into html linebreaks, which is annoying.

I thought it would be quite trivial to change the behaviour of vim to place soft linebreaks instead of hard ones before reaching a textwidth of 80 characters. Apparently I was wrong. This gives an explanation how to achive the behaviour, but did not work for me because no visual linebreaks are displayed at all. Other advices like setting columns=80 also did not work for me.

Fortunately there exists another easy solution: M-x longlines-mode.

Update: :set wrap, :set linebreak, :set columns=80 seems to work with xterm, but not with rxvt.