8

I'm trying to open a file using sublime text 3, and I would like to open it with the cursor at a concrete line number.

I've been checking subl --help but I could find no option for a concrete line. Therefore I'm just using: subl filename

Is there any option to do it?

1 Answer 1

18

You can use :line to open at the given line:

subl file.txt:345 

In my version of sublime-text 3, subl --help does give me the indication (last line):

subl --help Sublime Text build 3143 Usage: sublime_text [arguments] [files] edit the given files or: sublime_text [arguments] [directories] open the given directories Arguments: --project <project>: Load the given project --command <command>: Run the given command -n or --new-window: Open a new window -a or --add: Add folders to the current window -w or --wait: Wait for the files to be closed before returning -b or --background: Don't activate the application -h or --help: Show help (this message) and exit -v or --version: Show version and exit Filenames may be given a :line or :line:column suffix to open at a specific location. 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.