Hung-Yi’s Journal

Front-end Developer, Emacs Adventurer

11 Sep 2020

An evil-mc Emacs Hydra

One thing sorely lacking in native Emacs is the ability to edit with multiple cursors like VS Code. Fortunately for Doom Emacs or Evil users, there's evil-mc. But even with that installed, all it gives you is a bunch of commands—you still have to decide how to bind them yourself or rely on Doom's suggested bindings that map everything to the g z prefix for every command.

But I think we can do better. Today, I'm sharing an Emacs hydra that I've been using to power up my evil-mc usage. Just put this anywhere in your config.el:

09 Sep 2020

Emacs Lets You Calculate While You Write

Let's say you're writing a recipe but you want to scale the ingredients down by one third. The recipe calls for 280g of flour. And you want to round to the nearest 10g.

I applaud you if you can easily do that in your head—because I certainly can't. Also yes, it would be easy just to run your system's calculator app to get the answer, but why leave Emacs if you can help it? Doing it this way also saves you a bunch of manual copying and pasting.

07 Sep 2020

Pure CSS Signal Indicator

Simple HTML and CSS is all you need for a basic signal indicator icon. CSS flexbox makes it easy to space the bars evenly apart from each other and sink them to the bottom. After that, some weak, medium and strong classes and creative use of the :nth-child() selector lets us tweak the size and emphasis of the signal bars. Take a look!

06 Sep 2020

How to Do a Project-wide Search & Replace in Doom Emacs

Earlier this week I went looking for "how to search and replace in a whole project" in Emacs. I knew had Doom Emacs set up with evil turned on by default, and I knew to use SPC s p to launch a project text search. What was next…?

05 Sep 2020

Fonts Made for Coding

You may have heard that there are fonts1 designed specifically for programming work, especially ones that use programming ligatures. If you haven't heard—and you cut code—then you're in for a treat today! And if you're already in the loop, maybe you'll find a new favorite font to spruce up your code. Today, I'll explain why I chose JetBrains Mono for my own programming needs, and along the way I'll outline all the programming fonts I've come across so far.