From aa6e932b06137a697296ea5be62c73905ff68848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3hann=20Fri=C3=B0riksson?= Date: Thu, 9 Sep 2021 19:31:01 +0200 Subject: [PATCH] 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 --- plugins/vim-interaction/vim-interaction.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/vim-interaction/vim-interaction.plugin.zsh b/plugins/vim-interaction/vim-interaction.plugin.zsh index 010f998d3..53ec453e8 100644 --- a/plugins/vim-interaction/vim-interaction.plugin.zsh +++ b/plugins/vim-interaction/vim-interaction.plugin.zsh @@ -22,7 +22,8 @@ EOH local cmd="" local before="" 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