Category Archives: Software & Scripts

Automating Repetitive Text Editing with Vim Macros

Don’t you just hate it when you have to do some repetitive text editing, such as wrapping several lines of text in <li>...</li> tags or just about anything involving tables? (Actually, HTML is a veritable goldmine of repetition…) If you use vim, you can whip up macros on-the-fly to reduce this sort of tedium.

The commands to know are:

  • q — Start or stop macro recording. When starting, it should be used with a letter from a to z, which is the register it will record into. (So you can have more than one macro in memory at once.) The command is used singularly to end recording.
  • @ — Play back the macro. Use it in the form of @a to play the macro in register a.
  • @@ — Play the last-played macro again.

Rather than explain it in textual form, I recorded a short screencast that illustrates the basics of using macros in vim.

Ghost 0.4 Drops, Plugin API Slated for 0.5 Release

Version 0.4 of Ghost, the lightweight Node.js blogging platform, went live this month. Some of the more interesting features include support for static pages, a new way to quickly edit posts by appending /edit to the URL, support for date-based permalinks (e.g. /2014/01/25/example-post instead…

Vim Tip: Sort Lines Alphabetically

Have a list that you need to alphabetize quickly? Vim has you covered. There’s a handy :sort command (:help sort for optional arguments) that will do just what it says on the box. All you have to do is select the lines in visual…

Visualizing Directory Structures with the Tree Command

Sometimes good old ls just doesn’t cut it when you’re browsing directories from the command line. Sometimes you just need a more visual overview of the nested files and directories. Well, it turns out there’s a useful command for those cases, and it’s available…

List.js: Table and List Sorting in 5kb of JavaScript

List.js is a tiny (five kilobytes!) library that can add dynamic sorting, searching and pagination to HTML lists and tables. It requires no dependencies, and claims to be able to handle lists with “thousands of items.” It also includes a templating system that makes…

Take the Vim Challenge!

If you’re at all familiar with the Linux/Unix world, it’s safe to say you’ve probably heard of vim. The mode-based editor is famed for both its power and frustrating learning curve. Unlike most editors, which default to a mode where you can type text,…

Installing Multiple Ghost Blogs Behind NGINX on Ubuntu 12.04

Looking to set up a blog with Ghost? While it still has a few rough edges and missing features at the time of this writing, as it’s essentially in beta at this point (hence the “0.3” versioning), it definitely shows promise as a blogging…

Dashing — The Exceptionally Handsome Dashboard Framework

Need to throw together a quick dashboard with live-updated information and statistical readouts? Dashing is a fun new framework built atop Sinatra that lets you quickly setup dashboards, much in the style of Microsoft’s “Metro” UI. You can leverage premade widgets (which include numerical…

Homebrew: The Missing Package Manager for OS X

If you have worked at all with Linux, you’re probably familiar with the concept of a package manager. Type a short command and instantly install software. Programming languages even have their own these days, for managing libraries. Ruby has RubyGems, Node has NPM, PHP…

How to Enable Curly Quotes in Jekyll

I recently migrated one of my blogs from WordPress to Jekyll and painstakingly ported my custom theme to the new blog engine. I didn’t notice it at first, but Jekyll makes a major typographic faux pas by default: it uses ugly, straight “typewriter quotes”…

Page 1 of 12123456Last »