Frage

As a programmer, I frequently find myself using text editors rather than proprietry editing tools (like word) to smudge out blocks of text. But I and I'm sure many of you with OCD find it rather annoying when you need to edit a line above what you've already written, causing a jutting line out from your nicely formatted lines. I have had no other solution to this problem other than re-new-lining every single line thereafter to correct the margins.

for lack of a better definition: Is there a better way of reformatting blocks of text to a given line width. if possible by selection as well?

possible scenario:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

becomes:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

according to a predefined setting.

I am using sublime text 2.

War es hilfreich?

Lösung

I use Sublime Text 3, select text, go to Edit -> Wrap -> ...

hope that works in version 2

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top