Down the vim rabithole
Spending two hours each day on the train, offline and without distractions, gives me an excuse to go down various rabbit holes that a couple of months ago I would’ve thought nothing but time wasters. Starting to read the Dark Tower series—I’m almost done with the Gunslinger—is one of them. Re-learning vim—if dabbling with it in high school 15 years ago counts as having learned it—is another.
This episode of the Technical Difficulties podcast is what started it, followed by a blog post or two on the perfect setup. Now, I may or may not continue using vim as my primary writting tool—I would have to figure out how to integrate it into my workflow—but several things I picked up will always be useful:
-
git is an amazing tool for tracking changes that researchers should use more
-
don’t blindly edit stuff—dotfiles in this particular case—on your computer without understanding what those edits mean
-
Solarized should be your default color theme for anything
-
use your macro/keyboard shortcut app of choice (mine is Keyboard Maestro, you can just as easily—but not as prettily—use Better Touch Tools) to quickly position windows into quadrants, halves, thirds, etc.
-
there might not be much difference between bash and zsh if you are a beginner, but zsh has the cool customizable prompts
Yes, I am writing this in vim, previewing and exporting in Marked, then posting it manually to Squarespace. The only thing standing between me and a fancy-pants static website engine powering this blog is there being no internet access on MARC trains, and me being too cheap to get a $20-a-month personal hotspot from Sprint. That is probably for the best.
Get a journal article through your library proxy quickly with Alfred 2
It is always a pain clicking on a link to a journal article only to hit a paywall. It’s doubly painful when I know I have institutional access via my library’s proxy server, but have to jump through hoops to get it: go to the library website, log in, copy and paste the article name or PMID into its PubMed search box, and finally download the PDF. Arduous, and—turns out—unnecessary.
Enter Alfred 2 workflows. Here’s a nice article I found on Twitter today. The NEJM link in the top right corner leads to an abstract, but I need a special archive subscription for the full PDF. No matter—I can just highlight the PMID and hit my special Alfred 2 keyboard combo:
Since I’m not already logged into the Welch library proxy, I hit a login wall. It’s nothing 1Password can’t solve, but you can also just type in your username and password yourself, like an animal.
And Bam! The ugly but magic button is where it should be. Your institution might have a prettier one.
To make it clear—this simple workflow will do a PubMed search of any selected text anywhere in OS X, all through your institutional proxy server. Finding an interesting reference while reading an article, highlighting its title, and hitting ^⎇⌘P to get to the PDF always feels like magic.