[zsh] Added a session restore to vim when used without arguments
This commit is contained in:
parent
bf838b7d7c
commit
da06c4398e
1 changed files with 12 additions and 1 deletions
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue