Having a deep understanding of your tools and their shortcuts is super useful – so, I’m going to record some of the more obscure things I learn in this blog post! The idea is that,

  1. these tips can be linked to, so I don’t keep typing out the same explanations to different people
  2. unlike “write a program to automate X” and “learn vim”, these tips are all small enough to learn in a minute
  3. you come to check up on one tip, and accidentally discover something else that you didn’t think to search for
  4. these tips all relate to specific tools, not abstract concepts

I will not change a heading once it has been published, so you can link here for short explanations without worrying that they will break! You can mouse-over the # symbols which appear to the right of headings to see the link in the bottom left corner of your screen. The general format is: convert spaces to dashes, letters to lowercase, and remove all other punctuation. For example: https://alknemeyer.github.io/know-your-tools/#unicode-entry

In no particular order:

Unicode entry

Found via cormullion’s blog and edited slightly:

“It’s usually possible to type Unicode values directly into text.

  • On MacOS you hold the Option (⌥) key down while typing the four hex digits (make sure you’re using the Unicode Hex Input keyboard).
  • On Windows I think you type the four hex digits followed by ALT then X.
  • On Linux it might be ctrl-shift-u followed by the hex digits.”

Try it with 03b8 and you should get a theta symbol: θ

Quickly fix issues in VS Code

When using Python, the Pylance extension frequently finds simple-to-fix bugs. For example, if I type Tuple without having imported it from the typing module, I just need to type

from typing import Tuple

at the top of the file to fix it. This can be done automatically: move the cursor to the squiggly red line where the error is and press ctrl+. to automatically fix the issue. Most issues can’t be fixed like this, but it saves a lot of up-and-down scrolling which might otherwise break my focus

I also use the Spell Right extension. When I make a typo (as always happens when I try to spell indepedant indepedant) it’s just ctrl+., arrow down, enter


Background tasks in a terminal

While running a task in terminal, press ctrl+z to pause it, then do other stuff, then fg to put it in the foreground again. This can be useful when you don’t have an extra terminal to spare. For example:

$ python
>>> x = 1
>>> [ctrl+z]
$ # do stuff...
$ fg
Send job 1, “python3” to foreground
[enter⏎]
>>> x
1

Git Depth

Unless you’re planning on developing a branch, there’s often no need to download the entire history of a Git repository – just the most recent snapshot is fine. Do this by via the --depth flag:

git clone --depth 1 https://path.to/my/repo

Git Submodules

This can’t really be “learned” in under a minute so I won’t write to much about it here, but I’ll quote the description from the Git Submodule docs and let you decide whether you want to read more:

It often happens that while working on one project, you need to use another project from within it. Perhaps it’s a library that a third party developed or that you’re developing separately and using in multiple parent projects. A common issue arises in these scenarios: you want to be able to treat the two projects as separate yet still be able to use one from within the other.

So, you might have a Git repository which requires another Git repository to be downloaded as a sub-folder. The naive method would be to git clone or download it, and commit the entire repository. However, there’s no easy way of syncing changes between your copy and the original repo. Additionally, you need to commit a potentially large number of files

For more, read my blog post summarizing how I use it

VS Code shortcuts

From within VS Code, press ctrl+shift+p (or ⌘+P on Mac) to open the Command window. Type a command (for example, lower for lowercase), highlight the option you want using arrow keys, and press enter. Doing so with your cursor on a word, or with some text highlighted, will transform the text to lower case. I use this quite often.


The advantage of this work flow is that it’s almost as fast as using a dedicated key binding, without requiring you to memorize a bunch of (mostly useless) shortcuts. It’s a good middle ground between memorizing nothing (and searching through documentation/Stack Exchange each time) and memorizing everything, which I can’t be bothered to do.

You may not know what to type (some things aren’t intuitively named) but memorizing a specific word or phrase is generally much easier than some arbitrary sequence of keys. If you use a specific command a lot, just keep an eye out for the key binding shortcuts to the right of the command text. In time, you’ll learn it.