Jump to a Line Number in TextEdit Documents on the Mac

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.

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.

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).

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:

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!

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!