forked from ravenxrz/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.zsh
49 lines (41 loc) · 1.22 KB
/
settings.zsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Initialize completion
autoload -Uz compinit && compinit -i
zstyle ':completion:*' menu select=4
zmodload zsh/complist
# Use vim style navigation keys in menu completion
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
# Initialize editing command line
autoload -U edit-command-line && zle -N edit-command-line
# Enable interactive comments (# on the command line)
setopt interactivecomments
# Nicer history
HISTSIZE=1048576
HISTFILE="$HOME/.zsh_history"
SAVEHIST=$HISTSIZE
setopt appendhistory
setopt incappendhistory
setopt extendedhistory
# Time to wait for additional characters in a sequence
KEYTIMEOUT=1 # corresponds to 10ms
# Use vim as the editor
export EDITOR=nvim
# Use vim style line editing in zsh
bindkey -v
# Movement
bindkey -a 'gg' beginning-of-buffer-or-history
bindkey -a 'G' end-of-buffer-or-history
# Undo
bindkey -a 'u' undo
bindkey -a '^R' redo
# Edit line
bindkey -a '^V' edit-command-line
# Backspace
bindkey '^?' backward-delete-char
bindkey '^H' backward-delete-char
# Use incremental search
bindkey "^R" history-incremental-search-backward
# Disable shell builtins
disable r