summaryrefslogtreecommitdiff
path: root/.zshrc
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2021-09-04 15:52:20 +0300
committerSyndamia <kamen.d.mladenov@protonmail.com>2021-09-04 15:52:20 +0300
commit9717d34743abb94d4a21679bf18d7d1d42b511da (patch)
tree273e1fccc8da8f249834f8d5fd0564fe1b026b98 /.zshrc
parent2595319cdb991f019f7b52944eeccc28a98f1454 (diff)
downloaddotfiles-9717d34743abb94d4a21679bf18d7d1d42b511da.tar
dotfiles-9717d34743abb94d4a21679bf18d7d1d42b511da.tar.gz
dotfiles-9717d34743abb94d4a21679bf18d7d1d42b511da.zip
(2) Implemented .vim-session file creation upon pressing F1 key. Also, had to update vim alias to be a function.
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc11
1 files changed, 10 insertions, 1 deletions
diff --git a/.zshrc b/.zshrc
index 8475a4d..fded803 100644
--- a/.zshrc
+++ b/.zshrc
@@ -305,7 +305,6 @@ alias lg="lazygit"
alias q="exit"
alias x="exit"
-if [[ -x "$(command -v vimx)" ]]; then alias vim='vimx'; fi
alias v="vim"
alias cdg="cd ~/Programming/GitHub-repos/ && mcd"
@@ -316,6 +315,16 @@ alias cds="cd ~/Programming/source/ && mcd"
# Binds and alias-like functions
# ------------------------------------------------------------------------------
+if [[ -x "$(command -v vimx)" ]]; then
+ vim () {
+ if [ -f ".vim-session" ] && [ -z "$1" ]; then
+ vimx -S .vim-session
+ else
+ vimx $@
+ fi
+ }
+fi
+
mexec () {
for cmd in "${@[@]}"; do
if ! [ -z "$cmd" ]; then