Browse Source

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>
Jóhann Friðriksson 2 years ago
parent
commit
aa6e932b06
1 changed files with 2 additions and 1 deletions
  1. 2 1
      plugins/vim-interaction/vim-interaction.plugin.zsh

+ 2 - 1
plugins/vim-interaction/vim-interaction.plugin.zsh

@@ -22,7 +22,8 @@ EOH
   local cmd=""
   local before="<esc>"
   local after=""
-  local name="GVIM"
+  # Look up the newest instance
+  local name="$(gvim --serverlist | tail -n 1)"
   while getopts ":b:a:n:" option
   do
     case $option in