Set TextWrangler to Always Display Line Numbers

May 8, 2011 - 9 Comments

Show Line Numbers in TextWrangler

Want to always show line numbers in TextWrangler documents on Mac OS X? Of course you do! This is a great feature and it’s super easy to enable displaying of line numbers in TextWrangler for Mac:

How to Show Line Numbers in TextWrangler on Mac

  1. Pull down the Edit menu and scroll to “Text Options”
  2. Look for where you’ll see the preference panel that lets you set line numbers to be displayed with a checkbox
  3. Just be sure that checkbox is enabled and the line numbers will be permanently enabled for all documents
  4. Alternatively, you can hit Command+Option+, from within the app to bring up the view settings.

    TextWrangler is without a doubt the best free text editor for Mac OS X (if you don’t have it yet, you can get it free from BareBones), but why isn’t this enabled by default? This drove me absolutely nuts and I’m probably not the only one, thankfully it’s a simple switch once you find the setting. By the way, if you think TextWrangler is awesome, check out the bigger brother app called BBEdit, it’s amazing too.


    Update: Some users seem to be having an issue with getting line numbers to persist after quitting TextWrangler. I can’t reproduce that problem, but apparently another option is to go to Preferences > Text Status Display and check the “Show line numbers” check box there too. I also just discovered that we covered exactly that here before, so that could be a solution if they keep disappearing after relaunch.


Related articles:

Posted by: Matt Chan in Mac OS, Tips & Tricks


» Comments RSS Feed

  1. I just come over to osxdaily (I usually read the feeds) to say a big thank you for this, but then I read the comment of a guy stating that this trick is not permanent and so I checked to see if in my case it worked or not. Unfortunately it didn’t… :( So sad…

    Note that I checked to have just one window open (just to make sure one didn’t overwrite other’s settings), but that didn’t do the trick. Is there any xml/plist file to edit? I use textwrangler for work everyday and it’s really annoying doing that manually each time for debugging.
    Also, line numbers tend to be not aligned with actual text lines. After – let’s say – 300 lines text happens to be 4 lines above of the line number. Weird. o.O

  2. apprentice says:

    If you use “Text Options…” to display line number, this change will not be persistent. When you close the document and open another document, line number will be gone. To make it persistent, try this:

    “Preferences / Text Status Display / Show line numbers”.

    Good luck. :D

  3. Theo says:

    I use BBEdit at work and come home to TextWrangler, both are the best!

  4. Bink of Boldhome says:

    It doesn’t have Vi/Vim key bindings so it’s just as useless as all of the other so-called Mac editors (e.g. SubEthaEdit, Coda, BBEdit, XCode).

  5. Tyler says:

    I changed it and it works, but when I shut down and re-open it defaults back to no numbers:(

  6. Ketchup and mustard says:

    TextWrangler rocks, the only thing better than it is it’s big brother BBEdit but for the price of free, TW can’t be beat.

  7. apprentice says:

    It is a good idea to “trim trailing white-space character”. You can do this by setting “Preferences / Text Files / Strip trailing whitespace”.

  8. Marc says:

    Also available in the Mac App Sore.

Leave a Reply


Shop on and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks


iPhone / iPad



Shop on Amazon to help support this site