██████╗  ██████╗ ████████╗███████╗██╗██╗     ███████╗███████╗
██╔══██╗██╔═══██╗╚══██╔══╝██╔════╝██║██║     ██╔════╝██╔════╝
██║  ██║██║   ██║   ██║   █████╗  ██║██║     █████╗  ███████╗
██║  ██║██║   ██║   ██║   ██╔══╝  ██║██║     ██╔══╝  ╚════██║
██████╔╝╚██████╔╝   ██║   ██║     ██║███████╗███████╗███████║
╚═════╝  ╚═════╝    ╚═╝   ╚═╝     ╚═╝╚══════╝╚══════╝╚══════╝

dotfiles. by Jeff Kreeftmeijer

2016-06-25:

Fish-like autosuggestions in zsh

I used Fish for a while because of its amazing autosuggestions. Something similar can be achieved in zsh, with some plugins and a little bit of configuration.

autosuggestions in zsh

I use Antigen to install zsh plugins, so I need to add the plugins to my ~/.zshrc file:

antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-history-substring-search

After that, bind the up and down arrow keys to history-substring-search-up and history-substring-search-down:

bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down

Lastly, to prevent duplicate commands in the history file, set histignoredups:

setopt histignoredups
2016-06-21:

Remap Caps Lock and increase keyboard speed

I use Seil to remap my Caps Lock key to escape.

Remapping caps lock to escape in Seil

If you don’t want to install Seil, you can also remap your Caps Lock key to ⌃ , ⌥ or ⌘ (or disable it altogether) in System Preferences ( › System Preferences… › Keyboard › Modifier Keys…).

The key repeat speed can also be changed in System Preferences, or from the command line:

$ defaults write -g InitialKeyRepeat -int 15 # 250ms
$ defaults write -g KeyRepeat -int 2 #33ms
2016-06-14:

Disable ⌘S, ⌘W and ⌘Q in Terminal.app

I remapped three shortcut keys to ensure I don’t accidentally save terminal output or close a window in Terminal.app:

Setting up keyboard shortcuts for Terminal.app ( › System Preferences… › Keyboard)

Instead of using System Preferences, you can quickly set these up using defaults from the command line:

$ defaults write -app Terminal NSUserKeyEquivalents '{
  "Export Text As..." = "@^S";
  "Close Window"      = "@^W";
  "Quit Terminal"     = "@^Q";
}'
2016-06-07:

Minimal configuration for Terminal.app

The default settings in Terminal.app are quite sensible, so there are just three things I set up:

Inconsolata in 16pt with a line height of 1.25 in Terminal.app

I exported the profile and keep it in my dotfiles to make it easy to set up. To use it, install Inconsolata and open Basic+.terminal in Terminal.app.