Learn Docker With My Newest Course

Dive into Docker takes you from "What is Docker?" to confidently applying Docker to your own projects. It's packed with best practices and examples. Start Learning Docker →

The Real Reason I Like niri and Vim

the-real-reason-i-like-niri-and-vim.jpg

They're both completely different tools but they share a common trait which is being able to do something multiple ways.

Quick Jump:

Choice is really powerful and it’s the main reason I like these tools.

For example with niri to switch workspaces, I can hit Mod + D/U but I can also choose to hold Mod + Shift and then scroll up or down on my mouse wheel. If I’m using my laptop I can do a 3 finger swipe up or down instead. All of these shortcuts are configurable too.

To switch focus on windows sometimes I click them with my mouse, other times I press Mod + Left or Mod + H. Once in a while I hold Mod and scroll my mouse wheel. On a laptop I do a 3 finger swipe to the left or right.

To move windows sometimes I hit Mod + Ctrl + Left or Mod + Ctrl + H, other times I hold Mod and click + drag the window with my mouse. It really depends!

To jump between monitors sometimes I hold Mod and hit my mouse’s thumb back or forward button, sometimes I just flick my mouse across. Other times I’ll hold Mod + Ctrl + Shift + Right to both move the focused window to my other monitor and bring focus there. Once in a while I’ll hit Mod + W to fuzzy find the app name on the other monitor.

With Neovim, if you want to jump to the end of the line you can hit A in normal mode to jump right there and be ready to type within insert mode, but you can also hit $ to jump to the end of the line while staying in normal mode. You can also click there with your mouse, or maybe in the spur of the moment you tap e a few times to jump words.

There’s a million other examples with these tools.

All of this might seem minor but it’s not. These are things that keep you in a flow state while allowing you to move at the speed of thought. They make you feel like you’re in control of how you want to use your computer by removing friction. It’s optimized for you.

It also puts you in a better mood because you’re not constantly feeling like you’re limited by the tools you use at every corner. Instead, you have dozens or hundreds of these positive interactions a day.

This applies to other things too.

# Programming Languages, CLIs and APIs

Not all choice is created equal. Sometimes too much choice can be bad or confusing but not always. Like a lot of things, it depends on the context.

You often hear this with programming languages. Languages that have one way to do something vs many ways of doing something are often compared. Python vs Ruby is a text book example.

I see this as much different because you’re not making instant decisions based on how your brain decided it wanted to do it in the moment. Usually you think about how you want the logic to work and then you write the code to do it.

At this point it usually comes down to personal style opinions on how you want the code to look or read. I like both languages and have written a ton of code in both.

APIs (CLIs, web, etc.) are another area where this applies. I have stronger opinions here, I like less choice because it’s less surface area to remember. It lets me memorize one path to get somewhere instead of having a split brain situation where maybe you can run 4 different commands to do the same thing.

But there’s a lot of nuance here because having aliases or shortcuts to run a command can be very helpful. I really like the kubectl CLI for example. Python’s arg parse is also really neat where if you have an --output flag you can type --output, --out or any short abbreviation as long as it’s unique across your flags. This is quite helpful for flags where sometimes you forget if it’s --file or --files.

Really, all of this boils down to 1 simple thing. “Just do the thing I’m trying to do”.

The next time you have a thought around whether or not you like or dislike using something, run it through the “is this letting me do what I want?” filter.

# Demo Video

Timestamps

  • 0:05 – A few niri examples
  • 2:09 – A Neovim example
  • 3:07 – Choice is really important
  • 3:39 – Applies to programming languages
  • 4:23 – Applies to CLI tools
  • 5:50 – Just do the thing I want

What are some examples where this applies to the tools you use? Let me know below.

Never Miss a Tip, Trick or Tutorial

Like you, I'm super protective of my inbox, so don't worry about getting spammed. You can expect a few emails per year (at most), and you can 1-click unsubscribe at any time. See what else you'll get too.



Comments