Des Horsley
Des Horsley

Reputation: 1888

Change starting line number of SublimeText

I have access to a small portion of a code file, when I get an exception, the line number in the exception will refer to the entire code file, rather than just the section I have access too.

This means I'll get a error message for line 300, which is actually line 5 in my code file. The starting number varies depending on the file I'm working on.

To get around this at the moment, I just insert the relevant number of blank lines so that my line 1 lines up with where it will in the parent file.

I'd like to know if there is a way to get the line numbers in Sublime to start at something other than 1.

That way I'd be able to set the first line number in my file to the actual line number it will be when its inserted into the parent file.

Upvotes: 6

Views: 2057

Answers (1)

MattDMo
MattDMo

Reputation: 102852

The line numbers in Sublime are based on the number of lines that are actually in the current view. There is no method in the API to alter their appearance, unfortunately.

Upvotes: 4

Related Questions