Welcome to the lab.

mdless one dot oh my

[Tweet : nvALT]

Back in 2015 I wrote a little utility called mdless for previewing Markdown files on the command line. It performs some basic formatting fix-up, and then highlights the various elements of a Markdown document, paging it out in your terminal. While it’s been popular via Hacker News and StackOverflow posts, I hadn’t really updated it much since the release.

When I finally got around to responding to some GitHub issues on it, I decided to go a little beyond the bugfixes to polish and extend it a bit. The bugfixes include errors on syntax highlighting, overruns on long blocks, you know, stuff like that.

I’d been doing point releases from 0.0.1 to 0.0.15, but I’ve decided it’s at a 1.0 place. So join me in welcoming mdless 1.0.0. Cheers. (It’s actually 1.0.2 already, because bugs. You know how it is.) It’s honestly not that huge a release, but it does breathe new life into the aging utility.

What’s old

As a reminder (or introduction), here’s a list of the main features:

  • Built in pager functionality with pipe capability, a less replacement for Markdown files
  • Tidy and highlight (Multi)Markdown table syntax
  • Colorize Markdown syntax for most elements
  • Normalize spacing and link formatting
  • Display footnotes after each paragraph
  • Inline image display (local, optionally remote) if using iTerm2 2.9+
  • Syntax highlighting when Pygments is installed
  • List headlines in document, display single section of the document structure based on headlines

What’s new

mdless now does more and better Markdown highlighting
it picks apart a few syntaxes into more finite bits for colorization
Better formatting and highlighting of (Multi)Markdown tables
rewritten colorization code, which is generally of more benefit to me than you
Improved syntax highlighting for code blocks
Only fenced code with a language defined (e.g. ““`python”) will be highlighted
Prettier code blocks even if Pygments isn’t installed
Better language detection on fenced code blocks. Recognizes slightly malformed syntax and does a solid job of detecting language from any hashbang in the code
A blackout feature for adding a background color to blocks, even if they’re syntax highlighted
Totally user-customizable
Control every color for every element
Determine how different header levels are highlighted
Set a custom theme for Pygments highlighting

It’s still not perfect, but for getting a prettier view than cat when you want to peruse Markdown files in Terminal, it’s pretty top notch. In my opinion, anyway.

All of the documentation is updated, along with installation instructions, on the mdless project page.

Taking Control: The ADHD podcast #400

[Tweet : nvALT]

I had the pleasure of being the guest on Taking Control: The ADHD Podcast this week. Episode 400, which seems like a big one, numerically. I’m duly honored.

I mention it especially because the conversation ended up being enlightening to me. I didn’t know what I was going to talk about when I got on Zoom that day, but I found it very natural to be open and vulnerable about my experiences with ADHD and BPD. Which, ironically, is where the conversation started out.

We talked about how I’ve never found it scary to talk about my mental health, as screwed up as it may be. It’s easier to talk about it than hide it, so it’s really the path of least resistance for me. But I’ve learned over the years that not everyone has that proclivity, and being able to see others share makes a lot of people feel less alone, frustrated, and ashamed. I’m so glad that my inability to keep my feelings under wraps is beneficial to others, especially given the potential alternative reactions.

I learned a lot about myself just talking through it on the episode. Hopefully any ADHD folks with time to listen to it can enjoy the epiphanies with me. And while I hadn’t been a listener until after the invite came, I’ve been checking out the back catalog and will be a listener going forward. It’s a really great podcast for people with ADHD in their lives (in themselves or a love one).

Thanks to Pete and Nikki for letting me be a part of it! Check out episode 400 at rashpixel.fm.

Web Excursions for September 09, 2019

[Tweet : nvALT]

Brett holding map

Web excursions brought to you in partnership with MindMeister, the best collaborative mind mapping software out there.

Fans Are Better Than Tech at Organizing Information Online
I wish my own macOS tagging system could be this intelligent. Via @sjh_canada.
Postbox 7.0
As you may be aware, I’m a very happy MailMate user, but I’ve always been impressed with the power of the Postbox email client for Mac. Among a host of new features, the latest version adds new swipe gestures, new rich-text composition tools, and “Labs”, which allows running experimental 3rd-party code within Postbox.
AnyDrop for Mac
I like the idea of this: drag files to the menu bar and get a list of possible actions based on the type of file. But… it doesn’t appear to be user-extensible, so I’m happy sticking with Dropzone, personally.
Color System Plugin for Sketch
In the past, Dark Mode color schemes have usually been an afterthought for me. These days making a design pop in both light and dark versions requires attention from the beginning. This is a great Sketch plugin for setting up a color system that works.
Amazon Prime Video - Rotten Tomatoes Overlay
As someone who wishes Rotten Tomatoes were integrated everywhere I watch movies, this Chrome Extension which overlays Amazon Prime Video TV and movies with ratings is a welcome tool.

Check out MindMeister and start brainstorming, collaborating, and boosting productivity.

Notification of recent changes to your BrettTerpstra.com

[Tweet : nvALT]

I’ve been a bit too busy to get much content out the last couple of weeks, but I did want to take a second to point out some changes (improvements, hopefully) I’ve made to this site over the last couple of months. Mostly because I think they’re kind of cool and I know few people will ever notice them.

The time had come around for me to consider a redesign, but when I sat down to evaluate it, it turned out I still liked the overall layout of the site. So I focused on details, both design and speed related. You may love them, you might hate them, and I’m open to feedback on any of them.

Shell Tricks: a random selection

[Tweet : nvALT]

It’s been a while since I posted any shell tricks, so I’m just dumping a few random but useful aliases out here…

From Terminal to Finder

First, a one-line function (Bash, but easily converted) for opening Finder, either to the path in the first argument or to the current directory. Due to the way the open command works, you can use relative paths from the current directory in the argument.

f() { open -a "Finder" "${1-.}"; }

Copy the Current Directory Path

A stupid easy alias for copying the current directory to the clipboard. Simple, but useful. Note that it trims the trailing newline from the result in the clipboard.

alias cpwd='pwd|tr -d "\n"|pbcopy'

MailMate and Tagging

[Tweet : nvALT]

I’ve been considering a general “Why I love MailMate” post for some time now, but it keeps seeming like an overwhelming project. So instead, I’m going to focus on one small part. I’ve talked a bit about Bundles a couple of times before, so for now, let’s talk about one of my favorite topics: tagging.

First, as an introduction to MailMate, my favorite email client on the Mac, I’ll refer to this paragraph that I love from MailMate’s about page:

MailMate is not the most widespread, the cheapest, or the greatest looking email client, but I also have no aspiration to MailMate ever being any of these. Instead, MailMate aspires to be the most powerful, the most flexible, the most efficient, the most standards compliant, and the most secure email client.

Among MailMate’s many features, it allows messages to be tagged with any words you want, just like any tagging system. You get to determine what these tags represent, how they’re applied, and how to use them to create your own workflow.

Bunch’s latest abilities…

[Tweet : nvALT]

I got up a bit too early this morning. I finished a sprint on a freelance project but wasn’t ready to dig into my other big stuff yet. That stuff’s for after 5am. Before 5am is Bunch time. As promised, I haven’t written a blog post for every update, but you can find the full list of recent changes in the changelog.

If you don’t know what Bunch is, it’s an app I wrote for batch launching apps, opening files, toggling Do Not Disturb and a dozen other things. Start with the docs.

There are a few apps that I launch in Bunches that don’t respond to the XX command that would normally close all open windows for the app. Bunch uses an AppleScript “close every window” command to do this, and some apps by their nature just don’t like that. In Tower, for example, that command won’t work, but typing ⌥⌘W will. So, clearly, that’s what Bunch needed to be able to do.

Your August nvUltra update

[Tweet : nvALT]

The nvUltra private beta now has about 500 users putting it through its paces, and is rapidly nearing readiness for shipping. There are still a few major hurdles to jump through, and we’re sifting through user feedback — deciding what’s a valid feature request and what needs further clarification in our driving philosophy. I can’t put a solid date on release yet, but I have fond hopes of a late August release. Much to do before then, though, and you probably know how my release dates can slip (but I 100% guarantee this is not going to be BitWriter all over again)!