I just spent a little too long figuring out how to get Marked 2 to parse Markdown the same way GitHub does. You might want to do the same so that you can easily determine if the README doc you’re editing locally will appear the way you want it to on GitHub.
First, install GitHub’s Markdown parser with Homebrew:
brew install cmark-gfm.
Then in Marked 2’s Advanced Preferences pane:
Enable Custom Processor
2. Set the
3. Set the
-e table -e strikethrough -e autolink
I doubt this exists, but: I’m looking for a simple app that I can send commands to via a CLI that will show/hide overlay(s) above all other windows. The use case is that I have a few different keyboard modes that I toggle on/off via Karabiner and BetterTouchTool. But I have no visual indication that I’m currently in one of those special modes. It would be nice if when Karabiner/BTT triggers those special modes I’d also get a translucent banner along the bottom of the screen so I’d know that my keyboard was in one of those weird modes.
I always forget the exact syntax for making a symbolic link from the command line. It’s quick enough to look it up, especially when using Fish’s history search capabilities, but ever since I noticed you could make symlinks with LaunchBar, that has become my preferred method.
The animated GIF below shows making a symlink of a folder in my LaunchBar actions folder (
~/Library/Application Support/LaunchBar/Actions/beats-x-launchbar-actions) in a subfolder in my Projects folder (
The workflow goes like so:
- Select the folder you want the symlink to point to. In this case I selected it in the Finder and sent it to LaunchBar with Instant Send.
- Hit tab to invoke Send To…
- Select the target folder, where you want the new symlink to live. In this case I:
- Navigated to my
~/projects folder by typing p
- Tapped the right arrow key to navigate into the folder
- Started typing the name of the target folder laun
- Hit enter to get the list of actions
- Select “Make Symbolic Link (Absolute)” from the list of file actions.
This is a real case I ran into the other day while posting to my blog. The image embed code generated by WordPress set the image dimensions to twice what I wanted them to be. My intellectual laziness (not wanting to do some simple math in my head) is your gain because you’re going to learn how to do some quick calculations “in-place” with LaunchBar’s calculator and Instant Send feature.
- Select the number you want to do a calculation on.
- Send that number to LaunchBar with Instant Send. In my case that’s done by double-tapping the Command (⌘) key.
- Type /2 to divide the number by two.
- Type ShiftEnter to paste the resulting number back into the app you initially copied from.
- Type the math equation in place. In this case by turning
- Select that equation and send it to LaunchBar with Instant Send (double-tap Command).
- LaunchBar automatically detects you gave it a math problem so it instantly solves it for you. So type ShiftEnter to paste the result back to where it came from.
How many times have you typed something like
atom .gitignore or
code my-project to open a specific file or folder in your editor? And how many times have you typed
code . to open the current folder in your editor? I personally do that one a ton.
Not only is that too many characters to type, what happens when you decide that Atom is slow and it’s time to move to Visual Studio Code? You’ve got to retrain yourself to use a different four character command each time you open a file or directory.
Screw that. Set up an alias:
alias e "code"
Now you can type
e my-project or
e .gitignore to open a file or folder. And when you decide to give a new editor a try you can change your alias to point to you editor du jour and continuing just typing
e at the command line. With this alias, opening your current directory is as easy as typing
e .. But that’s not easy enough for me. It’s three whole characters when you count the space. And the E key and period key are on different sides of the keyboard! Wahhh! So set up a second alias:
alias ee "e ."
alias ee="e ."
Every time I type
ee to open the current directory, I smile. At least on the inside. And you will, too.
Thanks to iStats Menus I noticed there was a process constantly using just enough CPU to attract attention. Activity Monitor showed that one of the VS Code helpers was hovering at around 7%. Not terrible, but it was annoying me.
There is now a Process Explorer in VSCode that makes it much easier to determine exactly which VSCode process is hogging the CPU
After a little trial and error, disabling and reenabling extensions, I discovered it was the Settings Sync extension. Once that was disabled things calmed down. I dug a little deeper and discovered that it was turning on the
sync.autoUpload setting (which is off by default) that was really doing it. With that set back to
false the extension ran fine without using a bit too much CPU for my taste.
Got a good solution to this scrolling problem?
I’m not sure how I made it this far into my career without knowing I could quickly switch between fish and bash and zsh and any other shell I have on my system by simply typing the name of the shell I want to use.
Since I switched from zsh to fish around a year and a half ago, I’ve kept the stock macOS Terminal app (I normally use iTerm) set up to use zsh just in case I wanted to test something in a POSIX-compatible shell. All this time I’ve thought I’d have to do the following if I wanted to switch from fish to zsh:
chsh -s (which zsh)
- Enter my account password
- Open a new terminal tab
Trying to decide if you should replace spaces in your files names with dashes or underscores? Choose dashes. Why? If you use dashes, when you are editing the file name you can jump from word to word by tapping the left or right arrow key while holding down Option. Said another way, macOS recognizes the dash as a word separator; not so with the underscore.
If you’ve got VS Code’s
enablePreview options turned on, and they are by default, you might like to know that you can just hit ⌘-S to take it out of “Preview Mode” to prevent it from being replaced by the next file you open. In my opinion this is better than the other methods to make a file stay open: double-clicking the file’s tab (eww, touching your mouse or trackpad) or making the file “dirty” by entering some text and immediately deleting it.
I’ve never used this “preview” feature in any editor. I’ve recently gotten sick of ending up with dozens of tabs open in a project so I’ve been giving it a shot. This little tip is making me actually enjoy the feature.
Speaking of preview modes in text editors, I’d kill for Sublime Text’s legit preview mode the would instantly show you the contents of the file you had selected in the Quick Open menu. So good!