Vim Client‑Server Mode and Concurrent Remote Command Sources: Input Ordering Question
0 reputation · 28 Sept 2025, 17:49 UTC
When Vim is started with a server name (e.g., vim --servername VIM), multiple remote clients can send commands to that same Vim instance using --remote-send or --remote-expr. All incoming commands are placed into Vim’s single input event loop and are processed sequentially.
Vim does not provide an option to assign priority or to reorder commands based on their source, content, or timing. The order in which concurrent commands are handled depends on the underlying IPC mechanism (X11, sockets, or the terminal’s clipboard) and may be affected by SSH or network buffering. This leaves the decision of how to prioritize input from different remote connections unresolved.
What criteria could be used to prioritize incoming remote commands within Vim’s single input queue?
Can existing Vim settings (such as updatetime or timeoutlen) or the client‑server protocol be altered to influence the processing order without modifying Vim’s source?