fix(vim-interaction): look up the newest GVim instance (#9095)
Instead of relying on a hardcoded instance-name existing for the default-value, let's
look up the latest instance. This also resolves my problem where MacVim
had a servername of "VIM" instead of "GVIM".
Co-authored-by: Johann Fridriksson <jofridri@silabs.com>
Diff
1diff --git a/plugins/vim-interaction/vim-interaction.plugin.zsh b/plugins/vim-interaction/vim-interaction.plugin.zsh
2index 010f998d356abf1df0a8d8817a887abd45401637..53ec453e84902cd4013b9ba52371aa44fbfe068f 100644
3--- a/plugins/vim-interaction/vim-interaction.plugin.zsh
4+++ b/plugins/vim-interaction/vim-interaction.plugin.zsh
5@@ -22,7 +22,8 @@ EOH
6 local cmd=""
7 local before="<esc>"
8 local after=""
9- local name="GVIM"
10+ # Look up the newest instance
11+ local name="$(gvim --serverlist | tail -n 1)"
12 while getopts ":b:a:n:" option
13 do
14 case $option in