I am trying to make an alias for gvim that opens a file in a new tab using vim-server, the alias (for now) is:
/util/Linux/bin/gvim --servername $VIMSERVER --remote-tab-silent !*
While this is working, it leaves the gvim window in the background. I would like to bring the window to the front, tried several google solutions without success.
I am using RHEL 5.2, tcsh, vim 7.2, no root (work computer), and I don't have wmctrl installed (found some solutions that use wmctrl).
Help appreciated, thanks!
I had the same problem but this appears to work when using KDE.
Hopefully that works for you too.
For this, there are the foreground()
and remote_foreground()
functions, as in:
vim -c "call remote_foreground('$VIMSERVER')" -c quit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With