It's easy to get lost in the Unix configuration world. So many fancy choices! After working on Linux and macOS so many years, I converged my configs into a minimal set, which is just good enough, comprehensive, portable, and may be inspirational to you. ✨
It includes:
- A Makefile which can configure a local and even a remote machine.
- My vimrc for unadorned requirements of Python development.
- My Bash, Git, SSH, and tmux configs.
- My Karabiner config which ports the Bash keystrokes to the whole macOS.
The Makefile integrated all of the functionalities including copying and patching out the correct version of the configs, like tmux 1.x, 2.x, or 3.x, installing them into system, and installing extra packages, etc.
$ make config
The config is an all-in-one target to configure the local machine, which is equivalent to:
$ make clean
$ make
$ make install
$ make install-extra
The install-extra target executes scripts/install-* to install the extra packages. On Linux, it only executes scripts/install-vim-plug*.
$ make config HOST=mosky.tw
The config target also supports to configure a remote machine.
$ make config HOST=another.node.mydns REMOTE_SHELL='ssh -J mosky.tw'
The config target even supports the remote shell of rsync. I wrote another private script to configure bunch of servers. Awesome. 😎
The Makefile also has an uninstall target. The target removes, not restores, the configs installed by install. Note that it won't uninstall the packages installed by install-extra.
The vimrc has super detailed comments. 📚
The emacs-style keystrokes – more precisely, some of them are control chars – in Bash keep your hand in the center of keyboard. It feels so good to minimize the moving of fingers. The macOS supports partially. This config ports them all via Karabiner!
Believe me, you will fall in love with it. 😁
Emacs-Style | Default | Note |
---|---|---|
Ctrl-I | Tab | |
Ctrl-J | Return | |
Ctrl-M | Return | |
Ctrl-[ | Esc | |
Ctrl-H | Delete | Delete a char |
Ctrl-D | Fn-Delete | |
Ctrl-W | Opt-Delete | Delete a word |
Opt-D | Fn-Opt-Delete | |
Ctrl-U | Cmd-Delete | Delete within a line |
Ctrl-K | Fn-Cmd-Delete | |
Ctrl-B | Left | Move by a char |
Ctrl-F | Right | |
Opt-B | Opt-Left | Move by a word |
Opt-F | Opt-Right | |
Ctrl-A | Cmd-Left | Move within a line |
Ctrl-E | Cmd-Right | |
Ctrl-P | Up | Move by a line |
Ctrl-N | Down |
After install, enable it in Preferences / Complex Modifications / Add rule.
You also can install configs/karabiner_bash_emacs.json alone by:
$ cp configs/karabiner_bash_emacs.json ~/.config/karabiner/assets/complex_modifications/bash_emacs.json
Hope my configs help! ❤️