tangled
alpha
login
or
join now
biscui.tech
/
dotfiles
0
fork
atom
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
fix: zshrc with autosuggestions
biscui.tech
2 years ago
09a5b9dc
28c927c1
+2
-71
1 changed file
expand all
collapse all
unified
split
.zshrc
+2
-71
.zshrc
reviewed
···
74
74
setopt HIST_EXPIRE_DUPS_FIRST
75
75
76
76
# history setup
77
77
-
bindkey '\e[A' history-search-backward
78
78
-
bindkey '\e[B' history-search-forward
77
77
+
# bindkey '\e[A' history-search-backward
78
78
+
# bindkey '\e[B' history-search-forward
79
79
80
80
# Would you like to use another custom folder than $ZSH/custom?
81
81
# ZSH_CUSTOM=/path/to/new-custom-folder
···
116
116
# alias ohmyzsh="mate ~/.oh-my-zsh"
117
117
118
118
## Keys to expand selection
119
119
-
120
120
-
r-delregion() {
121
121
-
if ((REGION_ACTIVE)) then
122
122
-
zle kill-region
123
123
-
else
124
124
-
local widget_name=$1
125
125
-
shift
126
126
-
zle $widget_name -- $@
127
127
-
fi
128
128
-
}
129
129
-
130
130
-
r-deselect() {
131
131
-
((REGION_ACTIVE = 0))
132
132
-
local widget_name=$1
133
133
-
shift
134
134
-
zle $widget_name -- $@
135
135
-
}
136
136
-
137
137
-
r-select() {
138
138
-
((REGION_ACTIVE)) || zle set-mark-command
139
139
-
local widget_name=$1
140
140
-
shift
141
141
-
zle $widget_name -- $@
142
142
-
}
143
143
-
144
144
-
for key kcap seq mode widget (
145
145
-
sleft kLFT $'\e[1;2D' select backward-char
146
146
-
sright kRIT $'\e[1;2C' select forward-char
147
147
-
sup kri $'\e[1;2A' select up-line-or-history
148
148
-
sdown kind $'\e[1;2B' select down-line-or-history
149
149
-
150
150
-
send kEND $'\E[1;2F' select end-of-line
151
151
-
send2 x $'\E[4;2~' select end-of-line
152
152
-
153
153
-
shome kHOM $'\E[1;2H' select beginning-of-line
154
154
-
shome2 x $'\E[1;2~' select beginning-of-line
155
155
-
156
156
-
left kcub1 $'\EOD' deselect backward-char
157
157
-
right kcuf1 $'\EOC' deselect forward-char
158
158
-
159
159
-
end kend $'\EOF' deselect end-of-line
160
160
-
end2 x $'\E4~' deselect end-of-line
161
161
-
162
162
-
home khome $'\EOH' deselect beginning-of-line
163
163
-
home2 x $'\E1~' deselect beginning-of-line
164
164
-
165
165
-
csleft x $'\E[1;6D' select backward-word
166
166
-
csright x $'\E[1;6C' select forward-word
167
167
-
csend x $'\E[1;6F' select end-of-line
168
168
-
cshome x $'\E[1;6H' select beginning-of-line
169
169
-
170
170
-
cleft x $'\E[1;5D' deselect backward-word
171
171
-
cright x $'\E[1;5C' deselect forward-word
172
172
-
173
173
-
del kdch1 $'\E[3~' delregion delete-char
174
174
-
bs x $'^?' delregion backward-delete-char
175
175
-
176
176
-
) {
177
177
-
eval "key-$key() {
178
178
-
r-$mode $widget \$@
179
179
-
}"
180
180
-
zle -N key-$key
181
181
-
bindkey ${terminfo[$kcap]-$seq} key-$key
182
182
-
}
183
183
-
184
184
-
# restore backward-delete-char for Backspace in the incremental
185
185
-
# search keymap so it keeps working there:
186
186
-
bindkey -M isearch '^?' backward-delete-char
187
187
-
## End of keys
188
119
189
120
alias config='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'
190
121
export HELIX_RUNTIME=~/source/helix/runtime