In my daily work, I frequently switch between various applications like web browsers, email clients, messaging apps, and presentation tools — all of which require mouse interaction. Because of this, I no longer use GVim as a full IDE but rather for its original purpose: a powerful text editor.
Within this workflow, it's quite common to double-click a file to open it. However, I've noticed that doing so with text files launches a new instance of GVim each time. This not only slows things down, as the vimrc is reloaded with every launch, but also clutters my workspace with multiple GVim windows. The ideal behavior would be to reuse an existing GVim instance when opening files, avoiding repeated vimrc reloads and improving responsiveness.
Fortunately, I found a solution using GVim’s built-in server-client feature, which I’ll explain next.