How can I let TextMate show line numbers when I'm coding C++?
Asked
Active
Viewed 1.4k times
3 Answers
29
Press Cmd-Opt-L or select View » Gutter » Line Numbers.
I don't think it's possible to automatically enable display of line numbers dependent on your current language. But with the default keyboard shortcut this command is easy enough to reach.
Daniel Beck
- 111,893
0
For users stumbling on this question who want to actually insert numbers in front of each line, the following will help:
- Bundles > Text > Add Line Numbers to Selection
- Applies
"cat -n|expand -8"to selection/entire document
- Applies
- Text -> Filter through command... allows more flexibility. e.g.:
perl -pe 's/^/sprintf("%2d ",$.)/e'
Thanks to @Hans and @Paul on the TM list
tim
- 409