vim linebreak after hyphen with gq -


is there way configure vim's gq function allows line breaking after hyphen (in compound word)? e.g.

twentieth- century 

and way, i'm not on own laptop, on 1 of lab, runs windows, solution not using programs par or fmt bonus points :-) (though i'm interested in solutions using these tools if not possible using vim -- @ least able on laptop).

thanks in advance.

for ascii hyphen (0x2d), isn't possible. if you're able use unicode, can use identically-looking unicode variant (u+2010, cp. http://en.wikipedia.org/wiki/dash) instead. can inserted via ctrl-v (ctrl-q on windows installations of vim), followed u2010. or define digraph it:

:digraph -- 8208 " hyphen, u+2010 

with

:set formatoptions+=m 

vim will

also break @ multi-byte character above 255.

voila! if need persist text ascii, write mappings / wrapper around gq :substitutes hyphens , forth.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -