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.

Gvim has the -f option. Its man page says,

-f Foreground.    For  the  GUI  version, Vim will not fork and
                  detach from the shell it was started in.

What does this mean?

I encountered this option when trying to make the global menu work for gvim from How to get global application menu for gvim?.

I thought it would be that gvim -f file & would show gvim and gvim file & wouldn't. But they both seem to have same behavior.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The difference should be more apparent if you try it from a terminal without the ampersands. By default, gvim goes into the background so the user can run other commands, but -f makes it wait till the editor window closes.

share|improve this answer
    
I do not observe this behavior. I can execute other commands from terminal while running gvim -f file. Maybe you can be more explicit? –  StuartHa Jun 12 '13 at 20:45
    
@Stuart, do you have an alias for gvim? what does type -a gvim tell you? –  glenn jackman Jun 12 '13 at 21:11
    
-1 for me, you're right, my alias was blocking it. –  StuartHa Jun 12 '13 at 21:59

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.