Hi everyone!
I’m using kak
since a few weeks and I very like it, I’m a long term vim
user, so I still fight against my muscle memory
Beside the editor usage, I had an alias:
alias gvim='gvim --servername $(basename $PWD) --remote-silent'
That reuses a shared session if the editor is spawned from the same folder.
The option --remote-silent
makes the trick and silently connects to a remote server if the name is already taken.
Having a look at Session management: 1 session per desktop on bspwm, I made up an horrendous hack:
alias kak='f(){ kak -clear; name=$(basename $PWD); if kak -l | grep -q -x "$name"; then kak -c "$name" "$@"; else kak -s "$name" "$@"; fi }; f'
Is there a better option to make kak
do the same without wrappers?