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