zsh stuff
This commit is contained in:
parent
1a3e5945f4
commit
6c33090060
3 changed files with 24 additions and 27 deletions
|
@ -1,8 +1,27 @@
|
||||||
export ZDOTDIR="$HOME/.config/zsh"
|
export ZDOTDIR="$HOME/.config/zsh"
|
||||||
|
export DOTS="$HOME/docs/repos/dots"
|
||||||
|
|
||||||
|
export VISUAL="nvim"
|
||||||
|
export EDITOR="nvim"
|
||||||
|
|
||||||
typeset -U path
|
typeset -U path
|
||||||
path+="$HOME/bin"
|
path+="$HOME/bin"
|
||||||
|
|
||||||
export DOTS="$HOME/docs/repos/dots"
|
if (( $+commands[npm] )); then
|
||||||
|
export npm_config_prefix="$HOME/.local/npm"
|
||||||
|
path+="$HOME/.local/npm/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (( $+commands[go] )); then
|
||||||
|
path+="$HOME/go/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (( $+commands[pyenv] )); then
|
||||||
|
source <(pyenv init -)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (( $+commands[fzf] )); then
|
||||||
|
source <(fzf --zsh)
|
||||||
|
fi
|
||||||
|
|
||||||
# vim: filetype=zsh
|
# vim: filetype=zsh
|
||||||
|
|
|
@ -24,7 +24,7 @@ vim.api.nvim_create_autocmd("Filetype", {
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("Filetype", {
|
vim.api.nvim_create_autocmd("Filetype", {
|
||||||
group = vim.api.nvim_create_augroup("webDev", {}),
|
group = vim.api.nvim_create_augroup("webDev", {}),
|
||||||
pattern = { "html", "css", "javascript", "javascriptreact", "json" },
|
pattern = { "html", "css", "javascript", "svelte", "javascriptreact", "json" },
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.cmd [[setlocal tabstop=2 softtabstop=2 shiftwidth=2]]
|
vim.cmd [[setlocal tabstop=2 softtabstop=2 shiftwidth=2]]
|
||||||
vim.bo.formatprg = "prettier --stdin-filepath " .. vim.fn.expand("%:p")
|
vim.bo.formatprg = "prettier --stdin-filepath " .. vim.fn.expand("%:p")
|
||||||
|
|
|
@ -21,7 +21,6 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
zsh_add_plugin "mattmc3/ez-compinit"
|
zsh_add_plugin "mattmc3/ez-compinit"
|
||||||
|
|
||||||
zstyle ":completion:*" list-colors ${(s.:.)LS_COLORS}
|
zstyle ":completion:*" list-colors ${(s.:.)LS_COLORS}
|
||||||
zstyle ":completion:*" matcher-list "m:{a-z}={A-Za-z}"
|
zstyle ":completion:*" matcher-list "m:{a-z}={A-Za-z}"
|
||||||
zstyle ":completion:*" menu no
|
zstyle ":completion:*" menu no
|
||||||
|
@ -30,7 +29,6 @@ zstyle ":completion:*:git-checkout:*" sort false
|
||||||
zstyle ":fzf-tab:complete:cd:*" fzf-preview 'eza -1 --group-directories-first --color=always --icons=always $realpath'
|
zstyle ":fzf-tab:complete:cd:*" fzf-preview 'eza -1 --group-directories-first --color=always --icons=always $realpath'
|
||||||
|
|
||||||
create_dir "$HOME/.local/state/zsh"
|
create_dir "$HOME/.local/state/zsh"
|
||||||
|
|
||||||
HISTFILE="$HOME/.local/state/zsh/history"
|
HISTFILE="$HOME/.local/state/zsh/history"
|
||||||
HISTSIZE=65536
|
HISTSIZE=65536
|
||||||
SAVEHIST=$HISTSIZE
|
SAVEHIST=$HISTSIZE
|
||||||
|
@ -57,35 +55,12 @@ zsh_add_plugin "jeffreytse/zsh-vi-mode"
|
||||||
ZVM_LINE_INIT_MODE=$ZVM_MODE_INSERT
|
ZVM_LINE_INIT_MODE=$ZVM_MODE_INSERT
|
||||||
ZVM_INSERT_MODE_CURSOR=$ZVM_CURSOR_BLINKING_BEAM
|
ZVM_INSERT_MODE_CURSOR=$ZVM_CURSOR_BLINKING_BEAM
|
||||||
|
|
||||||
export VISUAL="nvim"
|
|
||||||
export EDITOR="nvim"
|
|
||||||
|
|
||||||
if (( $+commands[npm] )); then
|
|
||||||
export npm_config_prefix="$HOME/.local/npm"
|
|
||||||
path+="$HOME/.local/npm/bin"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if (( $+commands[pyenv] )); then
|
|
||||||
source <(pyenv init -)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if (( $+commands[fzf] )); then
|
|
||||||
source <(fzf --zsh)
|
|
||||||
fi
|
|
||||||
|
|
||||||
autoload -z edit-command-line
|
autoload -z edit-command-line
|
||||||
zle -N edit-command-line
|
zle -N edit-command-line
|
||||||
bindkey "^V" edit-command-line
|
bindkey "^V" edit-command-line
|
||||||
bindkey "^Y" autosuggest-execute
|
bindkey "^Y" autosuggest-execute
|
||||||
bindkey "^F" fzf-cd-widget
|
bindkey "^F" fzf-cd-widget
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# FUNCTIONS #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
function cc() python -c "from math import *; print($*)"
|
|
||||||
alias cc="noglob cc"
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# ALIASES #
|
# ALIASES #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -102,6 +77,9 @@ if [[ -f /etc/os-release ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
function cc() python -c "from math import *; print($*)"
|
||||||
|
alias cc="noglob cc"
|
||||||
|
|
||||||
alias vi="nvim"
|
alias vi="nvim"
|
||||||
|
|
||||||
alias l="eza -x --group-directories-first --icons always"
|
alias l="eza -x --group-directories-first --icons always"
|
||||||
|
|
Loading…
Reference in a new issue