PowerShell wrapper for Sublime Text's subl utility.
Platform | Build status |
---|---|
Windows | |
macOS | |
Linux |
Download or install from the PowerShell Gallery with Install-Module -Name posubl
and add Import-Module posubl
to your $profile
.
Add the location of the subl
binary to -ArgumentList
if Sublime is installed in a non-standard location, for example if using a portable version.
This imports the command Invoke-SublimeText
and the aliases sublime
and subl
.
Invoke-SublimeText
exposes all of subl
's parameters with both long and short form arguments available.
Parameter | Description |
---|---|
Files | Files to edit. File names may be given a :line or :line:column suffix to open at a specific location. |
Project | Project to load. |
Command | Command to run. |
NewWindow | Open a new window. |
Add | Add folders to the current window. |
Wait | Wait for the files to be closed before returning. |
Background | Don't activate the application. |
Stay | Keep the application activated after closing the file. |
Help | Show help and exit. |
Version | Show version and exit. |