SB - a command-line helper for Sublime Text projects
August 13, 2016 in ProjectsIf you want to use Sublime Text from the command line, there is the subl
command line utility available out of the box.
But I wanted a convenient way to say “open the Sublime Text project from this directory; create a project file from a template, if none exists”. I have my own sb
tool for that, which I’m publishing here.
I use sb
all the time so that I don’t have to hunt for project files, and fill common ignores for every new project.
My Sublime Text workflow
I have a projectname.sublime-project
file (and corresponding workspace) for each project. The project is typically configured with the project folder, the project-specific ignores (NPM node_modules
or Rails tmp
or Go’s vendor
come to mind), and sometimes plugin settings, like enabled or disabled Sublime Linter linters.
I open each project in a separate Sublime Text window. To open the projects, I just use sb
; this is convenient as I always open projects from the command line.
That’s how I worked in my Vim years, and it has changed little in Sublime Text. I also use Sublime Text with no tabs or the sidebar and rely on the keyboard for navigation.
Liked the post? Treat me to a coffee