Fullscreen for GVIM in Linux

To me, fullscreen does magic in terms of gained productivity – there’s no distraction anywhere; I can perfectly focus on the work ahead. MacVim has a nice fullscreen feature(CMD+SHIFT+F). I don’t want to miss it in my Linux environments, though.

In GVIM, there is a little manual labour involved, because in Linux, the window manager is responsible for, well.. managing windows – GVIM itself can’t implement “fullscreen”.

To achieve true fullscreen capabilities in GVIM and Linux, there are two steps involved:

  • Make a shortcut in your window manager for fullscreen
  • Get rid of GVIMs’ menu and toolbar

I’ll demo #1 for KDE:

Get rid of the menu:

And the toolbar:

Of course, you could edit your vimrc and set those flags globally.

Now, enjoy your editing with SHIFT+ALT+F.

Category: articles | Tags: , , , 5 comments »

5 Responses to “Fullscreen for GVIM in Linux”

  1. Jay Williams

    Thank you for sharing this. I’m trying out the Linux Mint distribution, and GVim’s lack of fullscreen mode was frustrating. I followed your suggestions, and now I have a full screen Vim experience!

  2. Gniourf

    I made this little thing to have gvim in fullscreen mode under linux. It works for me since I always only run one instance of gvim: http://gniourf-gniourf.blogspot.fr/2011/11/true-full-screen-for-gvim.html

    It’s a little trick that uses wmctrl.

  3. Alexandre

    I would like to say a big THANK YOU for sharing this. Your tip is working very well under Fedora 18. Now I don’t need to use pyroom and focuswriter anymore!

  4. Jan Hudec

    Creating new .desktop entry does not sound too reasonable. KDE allows defining custom window rules, which would be both simpler and more reliable here.

  5. wasd

    It may sound rude, but best solution I found to make gvim fullscreen is just to manually count number of lines / columns and just set it in .vimrc