Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
要从 vifm 打开 pdf 文件,我使用:filetype *.pdf zathura %f &. 并且自动将我聚焦在 zathura 窗口上。但是当我使用以下命令打开任何文本文件时:filetype *.c,*.h gvim --remote-tab-silent %f &我必须按下alt-tab或win-2切换到 gvim 窗口。我可以自动聚焦到 gvim 吗?
filetype *.pdf zathura %f &
filetype *.c,*.h gvim --remote-tab-silent %f &
alt-tab
win-2
为此,Vim 有这个remote_foreground()功能。尝试通过--remote-expr.
remote_foreground()
--remote-expr