Set TextWrangler to Always Display Line Numbers
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
- Pull down the Edit menu and scroll to “Text Options”
- Look for where you’ll see the preference panel that lets you set line numbers to be displayed with a checkbox
- Just be sure that checkbox is enabled and the line numbers will be permanently enabled for all documents
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.
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
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
I use BBEdit at work and come home to TextWrangler, both are the best!
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).
I changed it and it works, but when I shut down and re-open it defaults back to no numbers:(
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.
It is a good idea to “trim trailing white-space character”. You can do this by setting “Preferences / Text Files / Strip trailing whitespace”.
Is this really smart enough to only remove excess spaces?
Also available in the Mac App Sore.