Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I got a fairly old gvim (6.3) on CentOS 4.5. There's no --remote-tab-silent option yet. Instead, I use --remote to open file in same gvim instance. However, there's a problem that all files are opened in gvim in background. The gvim window won't pop to the front. I have to manually switch to it. Is there any way to fix this?

More detail on steps to reproduce:

  1. Open Konsole
  2. Open first file 'gvim --remote file1'. For the first time open file, gvim will pop to front.
  3. Switch back to Konsole and open 2nd file 'gvim --remote file2'. The file gets opened in gvim, but gvim window won't pop to front.
share|improve this question
    
Why don't you open files from GVim itself? –  romainl Apr 14 '12 at 16:01
add comment

1 Answer

Does "gvim --remote-expr foreground()" work to bring gVim to the front of the window stack? If this works consistently, you might set up a shell alias to invoke the --remote command then the --remote-expr command.

share|improve this answer
    
it didn't work. I also found this page (vim.1045645.n5.nabble.com/…), no luck either. –  Stan Apr 14 '12 at 22:38
    
Then your window manager may be semi-randomly refusing to let the window raise itself. Have you tried browsing through your desktop settings for your window manager? –  Heptite Apr 15 '12 at 4:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.