Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where do I find the line number in the Xcode editor?

Tags:

xcode

In Xcode 3, the line number of the current cursor location was displayed. I don't see this in Xcode 4. Is there a setting that will turn it on? Or a keypress that will give it to me?

like image 362
William Jockusch Avatar asked May 05 '11 17:05

William Jockusch


People also ask

How do I show line numbers in Xcode?

Choose Preferences... from the Xcode menu and select the Text Editing tab. We are interested in the Display section. The first option is the option we are looking for, Line numbers. Checking the checkbox displays line numbers in the gutter of the code editor.

How do I view line numbers?

Press the Esc key if you are currently in insert or append mode. Press : (the colon). The cursor should reappear at the lower left corner of the screen next to a : prompt. A column of sequential line numbers will then appear at the left side of the screen.

What is the left most column in the Xcode text editor known as?

The left-most column in the Code Editor which contains the line numbers is known as the Gutter. Blue arrow-tabs present in the gutter are "breakpoint indicators". Breakpoints are a part of the debugging process that we'll teach you about later. Above: Xcode when encountering a breakpoint.


2 Answers

For Xcode 4 and higher, open the preferences (command+,) and check "Show: Line numbers" in the "Text Editing" section.

Xcode 9 enter image description here

Xcode 8 and below Xcode Text Editing Preferences screen capture with Text Editing and Line Numbers highlighted

like image 98
Nick Weaver Avatar answered Oct 12 '22 23:10

Nick Weaver


In Preferences->Text Editing-> Show: Line numbers you can enable the line numbers on the left hand side of the file.

like image 25
wasabi Avatar answered Oct 13 '22 01:10

wasabi