1
Fork 0

zsh stuff

This commit is contained in:
Hadeed 2024-12-11 23:45:06 +05:00
parent 1a3e5945f4
commit 6c33090060
3 changed files with 24 additions and 27 deletions

View file

@ -1,8 +1,27 @@
export ZDOTDIR="$HOME/.config/zsh"
export DOTS="$HOME/docs/repos/dots"
export VISUAL="nvim"
export EDITOR="nvim"
typeset -U path
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

View file

@ -24,7 +24,7 @@ vim.api.nvim_create_autocmd("Filetype", {
vim.api.nvim_create_autocmd("Filetype", {
group = vim.api.nvim_create_augroup("webDev", {}),
pattern = { "html", "css", "javascript", "javascriptreact", "json" },
pattern = { "html", "css", "javascript", "svelte", "javascriptreact", "json" },
callback = function()
vim.cmd [[setlocal tabstop=2 softtabstop=2 shiftwidth=2]]
vim.bo.formatprg = "prettier --stdin-filepath " .. vim.fn.expand("%:p")

View file

@ -21,7 +21,6 @@ else
fi
zsh_add_plugin "mattmc3/ez-compinit"
zstyle ":completion:*" list-colors ${(s.:.)LS_COLORS}
zstyle ":completion:*" matcher-list "m:{a-z}={A-Za-z}"
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'
create_dir "$HOME/.local/state/zsh"
HISTFILE="$HOME/.local/state/zsh/history"
HISTSIZE=65536
SAVEHIST=$HISTSIZE
@ -57,35 +55,12 @@ zsh_add_plugin "jeffreytse/zsh-vi-mode"
ZVM_LINE_INIT_MODE=$ZVM_MODE_INSERT
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
zle -N edit-command-line
bindkey "^V" edit-command-line
bindkey "^Y" autosuggest-execute
bindkey "^F" fzf-cd-widget
###############################################################################
# FUNCTIONS #
###############################################################################
function cc() python -c "from math import *; print($*)"
alias cc="noglob cc"
###############################################################################
# ALIASES #
###############################################################################
@ -102,6 +77,9 @@ if [[ -f /etc/os-release ]]; then
fi
fi
function cc() python -c "from math import *; print($*)"
alias cc="noglob cc"
alias vi="nvim"
alias l="eza -x --group-directories-first --icons always"