Is there an "always on top" option for vim?

344 views
Skip to first unread message

Dahong Tang

unread,
Jul 27, 2013, 8:37:53 PM7/27/13
to vim...@googlegroups.com
Hi,

Whenever I use :make to compile, vim disappears from the screen and goes to the background, and is replaced by the shell command line screen with the message "Press ENTER or type command to continue".

In this case, one could use a macro to press ENTER automatically and bring back vim. But while the macro is running, the screen display is not smooth, i.e., one can still see that the screen redraws (although very quickly) as vim goes out, shell comes in and out, and finally vim comes into the screen again.

I am wondering, does anyone know if there is a way to keep vim always on top, like always in the foreground? I would like to keep the shell display in the background when executing :make, and redraw the screen only after the macro pressed ENTER and vim is back to the foreground?

Thanks!

Marcin Szamotulski

unread,
Jul 28, 2013, 7:41:12 AM7/28/13
to vim...@googlegroups.com
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>


Hi,

You have to use a :call system('make') for that. But it will not be
a perfect solution, since vim will freeze until the command has
executed. You can though append &. But in both cases the quick fix
error list will not be updated. You can also check out my plugin:
http://www.vim.org/scripts/script.php?script_id=4224

Best regards,
Marcin

Tim Chase

unread,
Jul 28, 2013, 8:06:19 AM7/28/13
to vim...@googlegroups.com, tang....@gmail.com
On 2013-07-27 17:37, Dahong Tang wrote:
> I am wondering, does anyone know if there is a way to keep vim
> always on top, like always in the foreground?

While AFAIK, vim doesn't have something like this built-in, this can
be a function of your window-manager. On Win32/MacOSX, I don't
believe they grant the user access to this functionality. On Linux,
I use Fluxbox as my window manager, and it has the ability to map
keys (many other X window managers do too) to raise/lower a given
window. So you could either raise Vim so it's above everything else,
or lower the compile window so it's below everything else.
Additionally, at least Fluxbox has the ability to set Z-index
properties automatically based on window title/ID, so when your
compile window is opened, it can automatically shove it in the
background.

-tim


Lukas Korsika

unread,
Jul 29, 2013, 7:31:35 PM7/29/13
to vim...@googlegroups.com
I'm not sure I'm understanding your question correctly, but have you tried ":silent make"?
Reply all
Reply to author
Forward
0 new messages