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.
Just hit Ctrl + G , and it does the same steps for you!
To select multiple regions using the keyboard, select a block of text, then press Ctrl+Shift+L to split it into one selection per line. When you're done with using multiple selections, just press Ctrl+K to trim all but the first.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With