Is there a way to turn gvim into fullscreen mode?

14,473

Solution 1

With gnome you can set a shortucut to the "fullscreen" action. Use gnome-keybinding-properties, select Window Managaer and choose Change to Fullscreen, then select a shorcut (F11 for example). This shortcut will set the current Gnome Window in fullscreen mode.

This doesn't work unless the Enable Extra WM Actions plugin is checked in the Compiz Settings Manager

Solution 2

The system settings do not work for me on Ubuntu 12.04 (as happens to miloshadzic) because gvim catches the F11 key and does not pass it on to the system.

There is a solution though, that I found in this blog

make sure you have wmctrl installed. If you have that, then add the following to your vimrc:

map <silent> <F11>
\    :call system("wmctrl -ir " . v:windowid . " -b toggle,fullscreen")<CR>

And on save of the .vimrc and restart of gvim F11 now has the desired effect.

Solution 3

For XFCE Users: Alt+F11 works out of the box

Share:
14,473

Related videos on Youtube

Khaja Minhajuddin
Author by

Khaja Minhajuddin

Recently, I've been building a simple web host which allows you to create and manage websites using Dropbox (http://www.websrvr.in/). Would love to get your feedback on that :) I am also the CEO of a Micro ISV called Cosmicvent. I work on ASP.NET MVC and Ruby on Rails. I am passionate about programming and always looking for more work :)

Updated on September 17, 2022

Comments

  • Khaja Minhajuddin
    Khaja Minhajuddin over 1 year

    Is there a way to turn gvim into fullscreen mode? I know that this is possible on OS X through MacVim, but wasn't able to find a way to do it on Ubuntu.

  • Khaja Minhajuddin
    Khaja Minhajuddin over 13 years
    Thank you, that did it for me. Just for folks who don't know how to do this the exact steps I followed are: - Click on System -> Preferences -> Keyboard Shortcuts - Go to the Window Management category - Select Toggle full screen mode and apply the F11 shortcut
  • vermin
    vermin over 13 years
    I've bound F11 to be the full screen key but when I press it in gVim, the window just flashes and nothing happens. It works in other apps. What am I doing wrong?