How to setup Vi Editing Mode for zsh

bindkey -v is enough to enable vi mode in ZSH. If you are worried the setting will be overwritten by another plugin, put the setting at the bottom of your ~/.zshrc. After vi mode is enabled, you enter the “insert” mode by default. To enter “normal” mode, use Esc. And i or a to switch … Read more

Case-insensitive Glob on zsh/bash

ZSH: $ unsetopt CASE_GLOB Or, if you don’t want to enable case-insensitive globbing in general, you can activate it for only the varying part: $ print -l (#i)(somelongstring)* This will match any file that starts with “somelongstring” (in any combination of lower/upper case). The case-insensitive flag applies for everything between the parentheses and can be … Read more

Adding timestamp to each line on Zsh

I’ve found it more non-destructive to actually prepend the time to the existing prompt without overriding it completely. This makes it work with any existing theme without interfering with its styling. Add this at the end of your .zshrc file. You can type the command nano ~/.zshrc to edit it using nano: PROMPT=’%{$fg[yellow]%}[%D{%f/%m/%y} %D{%L:%M:%S}] ‘$PROMPT … Read more

Emacs multi-term not displaying special characters correctly

Why is it not interpreting the escape characters returned by git-prompt_info and others correctly? The answer is most likely that multi-term just isn’t prepared to accept those escape sequences, in that format, for whatever reason. This may be a configuration issue, bug, or intentional. Setting the mode to accept colors, i.e. TERM=xterm-256color, improves the situation … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)