如何定义sublime命令?

时间:2014-11-07 15:48:25

标签: bash powershell sublimetext2 sublimetext

unofficial sublime documentation和许多其他地方引用了sublime命令。如何创建sublime命令?什么是在git bash或powershell for windows中运行命令的样板?

{ "caption": "Project: Save As", "command": "save_project_as" },

1 个答案:

答案 0 :(得分:0)

关于问题的第二部分,看起来好像调用subl(或者你的符号链接/快捷方式/可执行文件的sublime文本是什么),并且传递--command做你想要的。

Sublime Text build 3065

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
lo