Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm a Windows guy who recently switched to Ubuntu ... I use gVim for programming. Every time I launch gVim from the applications menu or from the right-click context menu, it opens in workspace #4, no matter what workspace I'm in (usually I'm just in #1, still getting used to that concept).

If I run gvim from a terminal, it stays in the same workspace, so I'm guessing this has something to do with the Unity desktop (?) How can I make gVim open in the current workspace?

share|improve this question
3  
I can't reproduce this. Have you experimented with anything like wmctrl or devilspie by any chance? Just asking, because those programs can control window placement like that. Also, do you have a custom gvim desktop file under ~/.local/share/applications/ ? –  geirha Mar 3 '12 at 16:39
    
No haven't used either of those, and don't have a custom desktop file there. Just the regular _vimrc file. But your comment made think of running gVim without anything in _vimrc, and guess what, when I do that it opens in the current workspace. I'll go through and see if I can isolate what was causing it. –  Eugene M Mar 3 '12 at 21:57
add comment

2 Answers 2

You do not have to pass on maximized windows.

I do it the following way to have a maximized window in the current workspace:

function! MaximizeWindow()
  set lines=999
  set columns=999
endfunction

autocmd GUIEnter * :call MaximizeWindow()
share|improve this answer
add comment
up vote 2 down vote accepted

OK, this was the culprit in the _vimrc file:

set lines=999
set columns=999

Thanks @geirha for your help.

share|improve this answer
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.