More direction than decision.
Use 'formatexpr' or 'formatprg' . When a line exceeds 'textwidth' and passes the criteria set using 'formatoptions' , they are used (if set) to break the line. The only real difference is that 'formatexpr' is a vimscript expression, and 'formatprg' filters the string through an external program.
So, if you are aware of the formatting that this conversion to python code lines can do, or you are ready to write one, this will give you a hook to execute it. And since vim supports python (see :help python ), you can even write your python formatter in python.
rampion Aug 22 '09 at 7:46 2009-08-22 07:46
source share