mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-11-06 03:12:24 +00:00
Steal some zsh dots from drusk
This commit is contained in:
parent
3e8208522e
commit
6585cfd81e
6 changed files with 126 additions and 32 deletions
|
@ -27,10 +27,14 @@ cursor:
|
||||||
style: "Block"
|
style: "Block"
|
||||||
unfocused_hollow: true
|
unfocused_hollow: true
|
||||||
font:
|
font:
|
||||||
normal: { "family": "Fira Code" }
|
#normal: { "family": "Fira Code" }
|
||||||
|
normal: { "family": "Jetbrains Mono" }
|
||||||
#normal: { "family": "Victor Mono" }
|
#normal: { "family": "Victor Mono" }
|
||||||
#normal: { "family": "Monoid" }
|
#normal: { "family": "Monoid" }
|
||||||
#normal: { "family": "Mono Lisa" }
|
#normal: { "family": "Mono Lisa" }
|
||||||
|
#normal: { "family": "cherry" }
|
||||||
|
#normal: { "family": "scientifica" }
|
||||||
|
#normal: { "family": "cozette" }
|
||||||
#normal: { "family": "xos4 Terminus" }
|
#normal: { "family": "xos4 Terminus" }
|
||||||
offset: { "x": 0, "y": 0 }
|
offset: { "x": 0, "y": 0 }
|
||||||
size: 12
|
size: 12
|
||||||
|
|
|
@ -123,3 +123,18 @@ spielinternen
|
||||||
Typsyntheseprozess
|
Typsyntheseprozess
|
||||||
Konditionalblöcken
|
Konditionalblöcken
|
||||||
bibliotheksinterne
|
bibliotheksinterne
|
||||||
|
Typkonstrukten
|
||||||
|
Tilemap
|
||||||
|
Dropdowns
|
||||||
|
Scrollelemente
|
||||||
|
Komponentensystem
|
||||||
|
Prefabs
|
||||||
|
Instruktionskomponenten
|
||||||
|
Instruktionsblöcke
|
||||||
|
mausbasierte
|
||||||
|
Datensammlungstypen
|
||||||
|
HashMaps
|
||||||
|
skriptbasierte
|
||||||
|
summentypbasierten
|
||||||
|
Typarumente
|
||||||
|
Typargumente
|
||||||
|
|
|
@ -41,3 +41,11 @@
|
||||||
{"rule":"COMMA_BEHIND_RELATIVE_CLAUSE","sentence":"^\\QDer größte Vorteil der Übersetzung in Maschinencode ist die Laufzeiteffizienz und Hardwarenähe, die dadurch erreicht werden kann \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q.\\E$"}
|
{"rule":"COMMA_BEHIND_RELATIVE_CLAUSE","sentence":"^\\QDer größte Vorteil der Übersetzung in Maschinencode ist die Laufzeiteffizienz und Hardwarenähe, die dadurch erreicht werden kann \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q.\\E$"}
|
||||||
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QDa keine konkrete Syntax vorgegeben werden soll, setzt \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q hier auf eine strukturierte Darstellung in Form eines Abstract Syntax Trees (\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q).\\E$"}
|
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QDa keine konkrete Syntax vorgegeben werden soll, setzt \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q hier auf eine strukturierte Darstellung in Form eines Abstract Syntax Trees (\\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q).\\E$"}
|
||||||
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QDer Aufbau der textbasierten Programmierspiele von Zachtronics ist ähnlich: laut Firmengründer \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q setzen diese auf eine weitgehend klassische Parser- und Compilerstruktur, welche den Programmcode in eine separate Laufzeitsimulation übergibt, die den Code schrittweise ausführt.\\E$"}
|
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QDer Aufbau der textbasierten Programmierspiele von Zachtronics ist ähnlich: laut Firmengründer \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q setzen diese auf eine weitgehend klassische Parser- und Compilerstruktur, welche den Programmcode in eine separate Laufzeitsimulation übergibt, die den Code schrittweise ausführt.\\E$"}
|
||||||
|
{"rule":"COMMA_BEHIND_RELATIVE_CLAUSE","sentence":"^\\QVariablen sind hier in dem Kontext, in dem sie initialisiert wurden, und allen darin enthaltenen Kontexten verfügbar, nicht aber außerhalb des jeweiligen Kontexts.\\E$"}
|
||||||
|
{"rule":"COMMA_BEHIND_RELATIVE_CLAUSE","sentence":"^\\QVariablen sind hier nur in dem Kontext, in dem sie initialisiert wurden, verfügbar.\\E$"}
|
||||||
|
{"rule":"COMMA_BEHIND_RELATIVE_CLAUSE","sentence":"^\\QVariablen sind in solchen Systemen nur in dem Kontext, in dem sie initialisiert wurden, verfügbar.\\E$"}
|
||||||
|
{"rule":"DE_CASE","sentence":"^\\QDiese Unterschiede fallen vor allem durch unterschiedliche mitgelieferte Typen und Klassen der Standardbibliothek, als auch bei der Verwendung von F-spezifischen Typkonstrukten aus C heraus auf.\\E$"}
|
||||||
|
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QDieses ist in F als \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q mit spezifischer Syntax gut unterstützt, und wird sowohl von F- als auch C-Listen implementiert.\\E$"}
|
||||||
|
{"rule":"GERMAN_SPELLER_RULE","sentence":"^\\QDieses ist in F als \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q mit spezifischer Syntax gut unterstützt und wird sowohl von F- als auch C-Listen implementiert.\\E$"}
|
||||||
|
{"rule":"DE_CASE","sentence":"^\\QDurch die direkte Verwendung von F-spezifischen Datenstrukturen wie den Summentypen in der \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q-Darstellung oder den F-Typen \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q und \\E(?:Dummy|Ina|Jimmy-)[0-9]+$"}
|
||||||
|
{"rule":"DE_CASE","sentence":"^\\Q[Verwendung von F-spezifischen Konstrukten]\\E$"}
|
||||||
|
|
|
@ -9,6 +9,7 @@ setopt HIST_IGNORE_ALL_DUPS
|
||||||
setopt EXTENDED_HISTORY
|
setopt EXTENDED_HISTORY
|
||||||
setopt SHARE_HISTORY
|
setopt SHARE_HISTORY
|
||||||
|
|
||||||
|
source "$ZDOTDIR/utils.zsh"
|
||||||
|
|
||||||
|
|
||||||
### Added by Zinit's installer
|
### Added by Zinit's installer
|
||||||
|
@ -35,21 +36,6 @@ zinit light-mode for \
|
||||||
### End of Zinit's installer chunk
|
### End of Zinit's installer chunk
|
||||||
|
|
||||||
|
|
||||||
# if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
|
|
||||||
# print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f"
|
|
||||||
# command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
|
|
||||||
# command git clone https://github.com/zdharma/zinit "$HOME/.zinit/bin" && \
|
|
||||||
# print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
|
|
||||||
# print -P "%F{160}▓▒░ The clone has failed.%f%b"
|
|
||||||
# fi
|
|
||||||
#
|
|
||||||
# source "$HOME/.zinit/bin/zinit.zsh"
|
|
||||||
# autoload -Uz _zinit
|
|
||||||
# (( ${+_comps} )) && _comps[zinit]=_zinit
|
|
||||||
#
|
|
||||||
# zinit snippet OMZP::git
|
|
||||||
# zinit wait lucid for "zsh-users/zsh-completions"
|
|
||||||
|
|
||||||
# compinit must be ran before fzf-tab, but fzf-tab must be before syntax highlighting etc
|
# compinit must be ran before fzf-tab, but fzf-tab must be before syntax highlighting etc
|
||||||
autoload -Uz compinit
|
autoload -Uz compinit
|
||||||
compinit
|
compinit
|
||||||
|
@ -65,8 +51,12 @@ zinit wait lucid for \
|
||||||
"pkulev/zsh-rustup-completion"
|
"pkulev/zsh-rustup-completion"
|
||||||
|
|
||||||
|
|
||||||
|
# clear the default keybinds, from utils.zsh
|
||||||
|
clear-keybinds
|
||||||
|
|
||||||
# load more stuff
|
# load more stuff
|
||||||
source "$ZDOTDIR/fzf-tab.zsh"
|
source "$ZDOTDIR/fzf-tab.zsh"
|
||||||
|
source "$ZDOTDIR/keybinds.zsh"
|
||||||
|
|
||||||
|
|
||||||
eval "$(zoxide init zsh)"
|
eval "$(zoxide init zsh)"
|
||||||
|
@ -88,22 +78,6 @@ export MANPAGER='nvim +Man! +"set nocul" +"set noshowcmd" +"set noruler" +"set n
|
||||||
autoload -Uz colors && colors
|
autoload -Uz colors && colors
|
||||||
autoload -Uz promptinit && promptinit
|
autoload -Uz promptinit && promptinit
|
||||||
|
|
||||||
# epic keybinds
|
|
||||||
|
|
||||||
my-backward-delete-word() {
|
|
||||||
local WORDCHARS=${WORDCHARS/\//}
|
|
||||||
zle backward-delete-word
|
|
||||||
}
|
|
||||||
zle -N my-backward-delete-word
|
|
||||||
bindkey '^W' my-backward-delete-word
|
|
||||||
bindkey '^H' backward-delete-word
|
|
||||||
bindkey "^[[H" beginning-of-line
|
|
||||||
bindkey "^[[F" end-of-line
|
|
||||||
bindkey "^[." insert-last-word
|
|
||||||
|
|
||||||
bindkey '^[[A' history-substring-search-up
|
|
||||||
bindkey '^[[B' history-substring-search-down
|
|
||||||
|
|
||||||
|
|
||||||
# alias
|
# alias
|
||||||
alias ls="exa --icons"
|
alias ls="exa --icons"
|
||||||
|
|
73
zsh/.config/zsh/keybinds.zsh
Normal file
73
zsh/.config/zsh/keybinds.zsh
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
# This file is currently mostly stolen from https://github.com/druskus20/dots/blob/master/zsh/.config/zsh/modules/keybinds.zsh
|
||||||
|
# Vi mode {{{
|
||||||
|
bindkey -v
|
||||||
|
|
||||||
|
# https://superuser.com/questions/476532/how-can-i-make-zshs-vi-mode-behave-more-like-bashs-vi-mode
|
||||||
|
export KEYTIMEOUT=1 # Vi mode timeout for key sequences
|
||||||
|
bindkey -M vicmd '^[' undefined-key
|
||||||
|
|
||||||
|
# Remove keybinds that begin with esc (so ESC doesnt hang)
|
||||||
|
bindkey -M vicmd -r "^[OA" # up-line-or-history
|
||||||
|
bindkey -M vicmd -r "^[OB" # down-line-or-history
|
||||||
|
bindkey -M vicmd -r "^[OC" # vi-forward-char
|
||||||
|
bindkey -M vicmd -r "^[OD" # vi-backward-char
|
||||||
|
bindkey -M vicmd -r "^[[200~" # bracketed-paste
|
||||||
|
bindkey -M vicmd -r "^[[A" # up-line-or-history
|
||||||
|
bindkey -M vicmd -r "^[[B" # down-line-or-history
|
||||||
|
bindkey -M vicmd -r "^[[C" # vi-forward-char
|
||||||
|
bindkey -M vicmd -r "^[[D" # vi-backward-char
|
||||||
|
|
||||||
|
# Remove execute because Im dumb
|
||||||
|
bindkey -M vicmd -r ":" # execute
|
||||||
|
|
||||||
|
bindkey -rM viins '^X'
|
||||||
|
bindkey -M viins '^X,' _history-complete-newer \
|
||||||
|
'^X/' _history-complete-older \
|
||||||
|
'^X`' _bash_complete-word
|
||||||
|
|
||||||
|
# Don't use vi mode in backward delete word/char because it cannot delete
|
||||||
|
# characters on the left of position you were in insert mode.
|
||||||
|
bindkey "^?" backward-delete-char
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
# Pipr thing {{{
|
||||||
|
_pipr_expand_widget() {
|
||||||
|
emulate -LR zsh
|
||||||
|
</dev/tty pipr --out-file /tmp/pipr_out --default "$LBUFFER" >/dev/null
|
||||||
|
LBUFFER=$(< /tmp/pipr_out)
|
||||||
|
}
|
||||||
|
zle -N _pipr_expand_widget
|
||||||
|
bindkey '\ea' _pipr_expand_widget
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
# Keybindings
|
||||||
|
|
||||||
|
# delete word but break on slashes
|
||||||
|
my-backward-delete-word() {
|
||||||
|
local WORDCHARS=${WORDCHARS/\//}
|
||||||
|
zle backward-delete-word
|
||||||
|
}
|
||||||
|
zle -N my-backward-delete-word
|
||||||
|
|
||||||
|
bindkey "^[[1;5C" forward-word # C-ArrowRight
|
||||||
|
bindkey "^[[1;5D" backward-word # C-ArrowLeft
|
||||||
|
bindkey "\e[3~" delete-char # Del
|
||||||
|
bindkey "^E" end-of-line # C-E
|
||||||
|
bindkey "^[[F" end-of-line # END
|
||||||
|
bindkey "^[[H" beginning-of-line # HOME
|
||||||
|
bindkey "^A" beginning-of-line # C-A
|
||||||
|
bindkey '^W' my-backward-delete-word # C-w
|
||||||
|
bindkey '^H' my-backward-delete-word # C-backspace
|
||||||
|
bindkey "^[." insert-last-word # alt-.
|
||||||
|
bindkey "^[[3~" delete-char # DEL
|
||||||
|
|
||||||
|
bindkey '^[[A' history-substring-search-up
|
||||||
|
bindkey '^[[B' history-substring-search-down
|
||||||
|
|
||||||
|
# C-Q to edit command in $EDITOR
|
||||||
|
autoload -U edit-command-line
|
||||||
|
zle -N edit-command-line
|
||||||
|
bindkey -M viins "^Q" edit-command-line
|
||||||
|
bindkey -M vicmd "^Q" edit-command-line
|
||||||
|
|
||||||
|
setopt NO_FLOW_CONTROL # Disable Ctrl+S and Ctrl+Q
|
20
zsh/.config/zsh/utils.zsh
Normal file
20
zsh/.config/zsh/utils.zsh
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# This part is stolen https://github.com/druskus20/dots/blob/master/zsh/.config/zsh/utils/utils.zsh
|
||||||
|
function do-nothing() {}
|
||||||
|
zle -N do-nothing do-nothing
|
||||||
|
|
||||||
|
# Disable default keybinds
|
||||||
|
function clear-keybinds() {
|
||||||
|
local key keys=(
|
||||||
|
"^A" "^B" "^D" "^E" "^F" "^N" "^O" "^P" "^Q" "^S" "^T" "^W" "^F" "^K"
|
||||||
|
"^X*" "^X=" "^X?" "^XC" "^XG" "^Xa" "^Xc" "^Xd" "^Xe" "^Xg" "^Xh" "^Xm" "^Xn"
|
||||||
|
"^Xr" "^Xs" "^Xt" "^Xu" "^X~" "^[ " "^[!" "^['" "^[," "^[-" "^[." "^[0" "^[1"
|
||||||
|
"^[2" "^[3" "^[4" "^[5" "^[6" "^[7" "^[8" "^[9" "^[<" "^[>" "^[?" "^[A" "^[B"
|
||||||
|
"^[C" "^[D" "^[F" "^[G" "^[L" "^[M" "^[N" "^[P" "^[Q" "^[S" "^[T" "^[U" "^[W"
|
||||||
|
"^[_" "^[a" "^[b" "^[c" "^[d" "^[f" "^[g" "^[l" "^[n" "^[p" "^[q" "^[s" "^[t"
|
||||||
|
"^[u" "^[w" "^[y" "^[z" "^[|" "^[~" "^[^I" "^[^J" "^[^_" "^[\"" "^[\$" "^X^B"
|
||||||
|
"^X^F" "^X^J" "^X^K" "^X^N" "^X^O" "^X^R" "^X^U" "^X^X" "^[^D" "^[^G")
|
||||||
|
for key in $keys; do
|
||||||
|
bindkey -r $key
|
||||||
|
done
|
||||||
|
}
|
||||||
|
zle -N clear-keybinds clear-keybinds
|
Loading…
Reference in a new issue