Jump to a Line Number in TextEdit Documents on the Mac

Feb 3, 2015 - 6 Comments

TextEdit icon

TextEdit is a surprisingly handy Mac app that is mostly underutilized and under appreciated, and while it’s certainly not going to compete with the abilities of pro text editors like BBEdit and TextWrangler, it can function as a simple code editor in a pinch. One of the quintessential features of any good text editor is the ability to jump to a specific line number, and TextEdit can do that.

To jump to any specific line in TextEdit, have a document open and then hit Command + L to bring up the “Select Line” tool. Then you just need to enter the line number and hit Return to move directly to and select that specified line of text in the active text document.

Line numbers in Text Edit selector tool

There is one small problem here, which you may have noticed already… TextEdit doesn’t display line numbers, and there is no option to show them.

Select a line number in TextEdit documents for Mac OS X

This obviously makes it a bit cumbersome to jump around to line numbers since you’d be relying on memory, another app, or someone else telling you what line number to see or edit, which realistically means you should be using a professional text editing app. Perhaps it’s not too surprising to have a Select Line tool in TextEdit, but it is a little weird to be missing the line number display given the inclusion of the line jump feature. (On a side note, you can manually hard code line numbers to a document, but that would never be a good idea for something like source code).

For best results with this, you’ll probably want to have set TextEdit to be Plain Text by default, kind of like Notepad from the Windows world, otherwise TextEdit opens a file as Rich Text which can lead to irregularities.

Realistically, if you’re doing anything complex that either requires line numbers or is aided by them, you should really just download TextWrangler, which is free and quite good and yes it displays line numbers, or go with BBEdit, which is paid and for the pros. Either way, it will make your life easier.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Paul Horowitz in Mac OS X, Tips & Tricks

6 Comments

» Comments RSS Feed

  1. mazzoo la says:

    Weird, TextEdit should have line numbers

  2. Brain Dead Homer says:

    Hello .. It’s textedit, who cares. For anything of importance were going to use MS Notepad. No worries, Homer has this one figured out.

    • Paul says:

      Sometimes the best text editor you have is the one you have in front of you (kind of like that old camera adage), particularly for modifying text files in the GUI. Of course, turning to nano or VIM is more practical for advanced users, but still TextEdit can get the job done in many situations. But yes indeed, it is a lot like MS Notepad!

  3. Corey says:

    i use the program text wrangler it has line numbers and color coding.

  4. Corey says:

    When i am working on a file or trying to code i use the program Text Wrangler. Its great its free and it keeps track of all your lines and gives you color coding.

  5. Dnadave says:

    Actually, you CAN number all the lines in a TextEdit doc:
    Select all, then hit the last item in the outlining drop down: 1,2,3…
    All of your lines will be numbered and the select line tool will go to the correct line!

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

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

Recent Posts