This macro requires the Sublime Text CLI to be configured. I followed the instructions here with a minor modification. Keyboard Maestro does not recognize the command in usr/local/bin so I created it in /usr/bin:
sudo ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/bin/sublime
This provides access to Sublime Text from the terminal on a Mac. My command is
sublime some instructions use the default name
This macro launches Sublime Text with my NVAlt folder as the source:
This macro opens the current Finder folder view in Sublime Text as a source:
Here is the AppleScript portion:
tell application "Finder" try activate set myWindow to folder of front window as string set myPath to (get POSIX path of myWindow) return myPath end try end tell
Why do it this way? Well, I don't want to create project files all over my file system. I just want to get a file list in Sublime Text and then use the "Find in Files" functionality (shift-⌘-F).
As pointed out in the comments to this post about using Sublime Text to write, it's annoying that it will not use the OS X spell checker and dictionary built into other text editors.
For example, here's the dictionary lookup in NVAlt:
Sublime Text 2? Not so much ...
I regularly switch my Safari user agent to "iPad" so I can play embedded YouTube videos without errors. It seems that many embedded videos still require flash if they see I am using Safari. Switching to the iPad user agent causes the videos to be played as HTML5 without need ...
I've blatantly stolen John Gruber's regular expression for matching URL's which is the best I've tried.
A tiny ...
I still prefer the flexibility of my macro but for many people, simpler is better.
Here's a macro to take advantage of the new Keyboard Maestro 5.3 Image actions. This macro processes an image (or several) selected in the Finder. If the image is larger than 600px wide, a new scaled copy is created that is 600px wide. But the trick is to ...
I'm just catching up on my Keyboard Maestro reading. There's some good stuff happening with it these days.
This macro is really just a series of scripts, so it could easily be converted to a LaunchBar plugin. The macro grabs the ...
Another solid update. This time Peter has added a bunch of image manipulation actions and better mouse controls. Every time I build some elaborate solution with twine and tape, Peter comes along and embarrasses me with a new feature set in Keyboard Maestro.
From a recent Gruber link, ImageOptim optimizes images without dramatically changing the image quality. I did some testing and I can not see a difference in quality but the file sizes are typically 30-50% smaller.
I often feel guilty about the large images in some of my posts. I do ...
Page 1 / 5