chore(zsh): Added a session restore to vim when used without arguments

This commit is contained in:
2024-06-08 18:10:53 +01:00
parent e933102ad8
commit 1868a7156c

View File

@@ -2,7 +2,18 @@
alias ls="eza --icons -l --sort type"
alias vim="nvim --listen /tmp/nvim.pipe"
function vim {
if [[ -z "$@" ]]; then
if [[ -f "./.session.vim" ]]; then
nvim -S .session.vim --listen /tmp/nvim.pipe -c 'lua vim.g.savesession = true'
else
nvim --listen /tmp/nvim.pipe -c 'lua vim.g.savesession = true'
fi
else
nvim --listen /tmp/nvim.pipe "$@"
fi
}
alias lg="lazygit"
alias calcurse-caldav='CALCURSE_CALDAV_PASSWORD=$(keyring get caldav afonso) calcurse-caldav'