У меня есть установка ST2, чтобы я мог сделать "sublime file.txt", и он откроется в окне ST2. Но как я могу открыть его на новой вкладке в открывшемся в настоящее время окне?
Как открыть файлы Sublime Text 2 из командной строки в linux на вкладке, а не в новом окне
Ответ 1
Попробуйте помощь в командной строке
subl --help Sublime Text 2 Build 2217
Usage: subl [arguments] [files] edit the given files
or: subl [arguments] [directories] open the given directories
or: subl [arguments] - edit stdin
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
-s or --stay: Keep the application activated after closing the file
-h or --help: Show help (this message) and exit
-v or --version: Show version and exit
--wait is implied if reading from stdin. Use --stay to not switch back
to the terminal when a file is closed (only relevant if waiting for a file).
Filenames may be given a :line or :line:column suffix to open at a specific
location.
После того, как вы открыли новое окно, последующие файлы должны быть добавлены в соответствии с поведением по умолчанию.
Ответ 2
Это работает на Ubuntu 12.04:
subl filename
или
subl -n filename
(если вы хотите, чтобы он открывался в отдельном окне)
Ответ 3
другой вариант: для открытия файла.
[sublime index.html script.js styles.css]
чтобы открыть папку [sublime folderName]
Ответ 4
subl fileName
и если вы хотите открыть новый файл, используйте
subl -n new_file_name