A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
| (defun toggle-maximize-buffer () "Maximize buffer" | |
| (interactive) | |
| (if (= 1 (length (window-list))) | |
| (jump-to-register '_) | |
| (progn | |
| (set-register '_ (list (current-window-configuration))) | |
| (delete-other-windows)))) | |
| ;; Bind it to a key. |
| Mac OS X has only 16K ports available that won't be released until socket | |
| TIME_WAIT is passed. The default timeout for TIME_WAIT is 15 seconds. | |
| Consider reducing in case of available port bottleneck. | |
| You can check whether this is a problem with netstat: | |
| # sysctl net.inet.tcp.msl | |
| net.inet.tcp.msl: 15000 | |
| # sudo sysctl -w net.inet.tcp.msl=100 |
| alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" |
| Add the following in .zshrc: | |
| ... | |
| plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl) | |
| ... | |
| ### Fix slowness of pastes with zsh-syntax-highlighting.zsh | |
| pasteinit() { | |
| OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]} | |
| zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`? |