使用命令行以行号打开Sublime文本文件

Evh*_*vhz 3 sublimetext sublimetext3

我正在尝试使用sublime text 3打开文件,并且我想用光标在一个具体的行号处打开它。

我一直在检查,subl --help但找不到具体的选项。因此,我只是在使用: subl filename

有什么选择吗?

Xav*_*hot 7

您可以使用:line在给定的行打开:

subl file.txt:345
Run Code Online (Sandbox Code Playgroud)

在我的sublime-text 3版本中,subl --help确实给了我指示(最后一行):

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.
Run Code Online (Sandbox Code Playgroud)