summaryrefslogtreecommitdiff
path: root/.zshrc
diff options
context:
space:
mode:
authorTom Barrett <tom@tombarrett.xyz>2021-03-31 17:28:39 +0200
committerTom Barrett <tom@tombarrett.xyz>2021-03-31 17:28:39 +0200
commit67cba5cff1e4d0af4da1236a7e9f9a3ef903b28e (patch)
tree359230656961c8ef92a26ad292f964ff884646c4 /.zshrc
parent395c8704da88be4e95df0953938eddf5b0382b3d (diff)
tired of fish lagging
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc63
1 files changed, 63 insertions, 0 deletions
diff --git a/.zshrc b/.zshrc
new file mode 100644
index 0000000..9660822
--- /dev/null
+++ b/.zshrc
@@ -0,0 +1,63 @@
+typeset -U PATH path
+path=( "$HOME/bin"
+ "$HOME/.local/bin"
+ "$HOME/.cargo/bin"
+ "/bin"
+ "/usr/bin"
+ "/usr/games"
+ "/usr/local/games"
+ "/usr/local/bin"
+ "/usr/local/sbin"
+)
+export PATH
+
+autoload -Uz compinit
+compinit
+zmodload zsh/complist
+zstyle ':completion:*' menu select
+
+bindkey -v
+bindkey -M menuselect 'h' vi-backward-char
+bindkey -M menuselect 'k' vi-up-line-or-history
+bindkey -M menuselect 'l' vi-forward-char
+bindkey -M menuselect 'j' vi-down-line-or-history
+bindkey -v '^?' backward-delete-char
+
+function zle-keymap-select () {
+ case $KEYMAP in
+ vicmd) echo -ne '\e[1 q';;
+ viins|main) echo -ne '\e[5 q';;
+ esac
+}
+zle -N zle-keymap-select
+
+zle-line-init() {
+ zle -K viins
+ echo -ne "\e[5 q"
+}
+zle -N zle-line-init
+
+autoload -Uz edit-command-line
+zle -N edit-command-line
+bindkey '^e' edit-command-line
+
+alias ls='ls --color'
+alias la='ls -la --color'
+alias vim='nvim'
+
+setopt auto_cd
+
+HISTSIZE=999999999
+SAVEHIST=999999999
+HISTFILE=~/.history
+
+source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
+source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
+bindkey '^f' end-of-line
+
+autoload -Uz vcs_info
+precmd() { vcs_info }
+zstyle ':vcs_info:git:*' formats '|%F{3}%b%f'
+
+setopt PROMPT_SUBST
+PROMPT='<%F{2}%n%f@%F{6}%m%f|%F{5}%~%f${vcs_info_msg_0_}%f> '