3

I would really like to find a way to start gvim without the terminal losing focus.

I found a way to use gvim to display code when debugging in dbx. Gvim as dbx frontend
This works great but it causes gvim to steal the focus every time it hits a breakpoint or changes line.
I am pretty sure I could adapt a terminal keeping focus to work inside dbx.
I am running solaris on a sparc processor.

How can I start gvim without it taking focus from the terminal that started it?

Sam Brinck
  • 891
  • 1
  • 7
  • 11
  • Must you start gvim without losing focus or would sending files to a running gvim without losing focus suffice? Starting gvim, then running `gvim --remote file.txt` opens the file in gvim without gvim stealing focus. – Randy Morris Apr 12 '11 at 16:55
  • I actually am sending it to a running gvim with --remote-silent but it is still stealing focus. – Sam Brinck Apr 12 '11 at 16:58
  • Hmm, platform? Tested here on a couple linux boxes and it seems to work as I described. – Randy Morris Apr 12 '11 at 17:08
  • I am running on sparc solaris, that might actually be the problem. I seem to run into a lot of problems no else sees on other platforms. Edited the question to reflect. – Sam Brinck Apr 12 '11 at 17:36
  • I assume you can reproduce the same behavior using gvim --remote-silent without dbx in the picture? Is it easy for you to try using a different window manager? – Chris Quenelle Apr 12 '11 at 22:00
  • Correct --remote-silent steals focus regardless of if it is executed inside dbx or not. My choices of window managers are CDE or java desktop for solaris. Even with this current problem the java desktop is preferable to CDE. So far my only solution is to turn on sloppy focus so that focus follows the mouse regardless of gvim taking it. I have a hard time going this route though because I am so used to using alt-tab to switch applications – Sam Brinck Apr 13 '11 at 19:11

1 Answers1

0

If you're a KDE user, you can start gvim with the kstart command. The kstart program has extensive options for controlling the behavior of the program you're starting. The --onbottom option might accomplish what you're trying to do.