id = "sublime-text" name = "Sublime Text" homepage = "https://www.sublimetext.com" description = "A sophisticated text editor for code, markup and prose." icon = "SimpleIcons:sublimetext" # `subl` is the command-line helper Sublime Text installs; it opens files in # the editor and carries no configuration of its own, so the entry is filed # under the editor whose settings it reaches — the same way `code` is filed # under Visual Studio Code. executables = ["subl"] [dotfiles] # https://www.sublimetext.com/docs/side_by_side.html gives the data directory # per platform: "%APPDATA%\Sublime Text" on Windows, # "~/Library/Application Support/Sublime Text" on macOS and # "~/.config/sublime-text" on Linux (the ST3 directories are the same with a # "3" appended, and are not listed here). # https://docs.sublimetext.io/guide/customization/settings.html: "Always place # your personal settings files under Packages/User to guarantee they will take # precedence over any other conflicting settings files" — that is where # Preferences.sublime-settings, the .sublime-keymap files, the snippets and # each package's user overrides land. paths = [ "~/Library/Application Support/Sublime Text/Packages/User/", "~/.config/sublime-text/Packages/User/", "%APPDATA%/Sublime Text/Packages/User/", ] # The rest of the data directory is installed software and per-machine state: # "Installed Packages" holds the downloaded .sublime-package archives, "Cache" # the index, "Local" the session. None of it is named above, so there is # nothing to carve out of what is. # Nothing Sublime Text writes into Packages/User is a credential: it is the # settings, key bindings and snippets the user authored. secret = [] # No machine_lines: these are preference files, which is exactly what a user # wants to follow them. A setting pointing at an absolute path exists, but # which key that is differs per package, and inventing a list would strand the # settings everybody does want to carry. [commands] format = 1 label = "Open in Sublime Text" description = "Open files or folders with subl. Window and focus behaviour are covered; safe mode and version flags are left out." quality = "ai-draft" base = "fig:subl" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/subl.ts" license = "MIT" [[commands.field]] id = "targets" label = "Files or folders" type = "path" position = 0 multiple = true path = { kind = "any", role = "input", must_exist = false } sources = ["fig"] [[commands.field]] id = "new_window" label = "New window" type = "boolean" option = ["--new-window", "-n"] sources = ["fig"] [[commands.field]] id = "add" label = "Add to current window" type = "boolean" option = ["--add", "-a"] sources = ["fig"] [[commands.field]] id = "wait" label = "Wait until closed" type = "boolean" option = ["--wait", "-w"] sources = ["fig"] [[commands.field]] id = "background" label = "Do not activate" type = "boolean" option = ["--background", "-b"] sources = ["fig"] [[commands.field]] id = "stay" label = "Stay activated" type = "boolean" option = ["--stay", "-s"] sources = ["fig"] [[commands.field]] id = "project" label = "Project file" type = "path" option = ["--project"] path = { kind = "file", role = "input", must_exist = true } sources = ["fig"] [[commands.field]] id = "launch_or_new" label = "Launch or new window" description = "Only open a new window if the application is already open." type = "boolean" option = ["--launch-or-new-window"] sources = ["fig"] [[commands.field]] id = "command" label = "Command" type = "string" option = ["--command"] sources = ["fig"] [[commands.task]] id = "open" label = "Open in new window" set = { new_window = [true] } fields = ["targets", "new_window"] required = ["targets"] [[commands.task]] id = "add" label = "Add folder to window" set = { add = [true] } lock = ["add"] fields = ["targets", "add"] required = ["targets"] [[commands.task]] id = "wait" label = "Open and wait (editor for git)" set = { wait = [true] } lock = ["wait"] fields = ["targets", "wait"] required = ["targets"] [[commands.group]] id = "basic" label = "Basic" fields = ["targets", "new_window", "add", "wait"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["background", "stay", "project", "launch_or_new", "command"]