{"componentChunkName":"component---src-templates-post-jsx","path":"/blog/000-mac-open-in-sublime-menu/","result":{"data":{"markdownRemark":{"html":"<h1 id=\"enable-osx-sierra-context-menu-launch\"><a href=\"#enable-osx-sierra-context-menu-launch\" aria-label=\"enable osx sierra context menu launch permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Enable OSX Sierra Context Menu Launch:</h1>\n<p><em>The process for older OSX versions is similar, so you should still be able to use this as a guide.</em></p>\n<ol>\n<li>Open up Automator (using Spotlight or finding it under \"Applications\") and click \"New Document\".</li>\n<li>Select \"Service\" from the tiled menu.</li>\n<li>Search for \"Run Shell Script\" in the upper left to find our action type. Drag it over to the main panel, or you can double click it.</li>\n<li>In the top bar, set \"Services receive selected\" to \"files or folders\".</li>\n<li>Select your shell type of choice, or leave it as <code class=\"language-text\">/bin/bash</code> if you're unsure.\nChange the \"Pass input\" setting to \"as arguments\".</li>\n<li>For <strong>Sublime Text 3</strong>, enter the following in the text input:</li>\n</ol>\n<p><code class=\"language-text\">/Applications/Sublime\\ Text.app/Contents/SharedSupport/bin/subl -n &quot;$@&quot;</code></p>\n<p>For <strong>Sublime Text 2</strong>, enter the following in the text input:</p>\n<p><code class=\"language-text\">/Applications/Sublime\\ Text\\ 2.app/Contents/SharedSupport/bin/subl -n &quot;$@&quot;</code></p>\n<ol>\n<li>Save as \"Open in Sublime\". You can save it as whatever you want, but this will become the display name of the service.</li>\n</ol>\n<p>Now when you right click on a file or folder, under \"Services\" you will see \"Open in Sublime\".</p>\n<p>I also set up a service for adding a file or directory to the current Sublime window. You can duplicate the process above using the <code class=\"language-text\">-a</code> flag instead of <code class=\"language-text\">-n</code> in the command, and name it something appropriate like \"Open in Current Sublime Window\".</p>","timeToRead":1,"excerpt":"Enable OSX Sierra Context Menu Launch: The process for older OSX versions is similar, so you should still be able to use this as a guide…","frontmatter":{"title":"Adding 'Open in Sublime' to Mac Context Menu","cover":"https://images.unsplash.com/photo-1473520844623-167ad716dcae?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=3300&q=80","date":"2016-12-07","category":"tutorial","tags":["osx","workflow"]},"fields":{"slug":"/blog/000-mac-open-in-sublime-menu/","date":"2016-12-07T07:00:00.000Z"}}},"pageContext":{"slug":"/blog/000-mac-open-in-sublime-menu/"}}}