Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I don't know if this can be done globally or only in concrete bundles. If so, I'm interested in doing it only in the LaTeX files (LaTeX bundle then). If the solution only works globally, well, no problem.

At this moment, with the Soft Wrap option enabled (and with 80 characters per line and a Tab size equal to 3) this is what I get

enter image description here

But I'm interested in getting all the wrapped parts of the line (those identified by a · instead of a line number) indented the same as the first part of the line. Like this

enter image description here

But I don't want the line divided (as in the image), just that the wrapping starts from the same indented place. I.e., while I want TextMate to show me that way, there shouldn't be any tab in the .txt file (I mean, if I open it with another text editor it shouldn't be that way).

Is this possible? How?

Here a more extensive example

enter image description here

share|improve this question
up vote 3 down vote accepted

Thanks to this I solved it.

Note: This applies only to TextMate 2.

  1. On the menu bar, select Bundles › Edit Bundles.

  2. Within the Bundle Editor display, select LaTeX › Settings. Once here, a list of preferences indicated by a white P on a gray circle is seen.

  3. On the menu bar again, click on New or press command-N. From the Bundle Editor display, TM will prompt you to choose what to create: bundle, command, setting, grammar, etc.

  4. Click setting. An untitled setting will appear in the Bundle Editor window.

  5. Name the new setting. I used Soft-wrap indent.

  6. Select the new setting if not already selected.

  7. In the text field, paste

    {   indentedSoftWrap = {
            match = '\A[ \t]*';
            format = '$0';

This enables soft-wrap indent + 1 extra tab.

  1. If you wish to restrict this to a certain scope, it can be done in the drawer next to "scope selector." Leaving it blank will enable soft-wrap indentation for any text file.

  2. Save the setting by pressing command-S and close the Bundle Editor.

  3. Make sure soft wrap is enabled. (View › Soft Wrap). It might be necessary to reload any open files for the setting to take effect.

share|improve this answer
Thanks for this tip. I've tried it myself but unfortunately it doesn't work. I'm assuming you add a new "preference" rather than "setting", and there is no option to add "setting". Has this worked for anyone else? – Carl Apr 23 '13 at 13:42
@Carl I suppose. And if you delete the \t you get the exact thing instead of (sofrwrap indent + 1). – Manuel Apr 23 '13 at 15:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .