Ubuntu: Is there a way to turn gvim into fullscreen mode?



Question:

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.


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 User: Alt+F11 works out of the box


Solution:4

You can also switch into fullscreen mode by changing the lines and columns settings. Try to put this into your vimrc:

if has('gui_running')      set lines=999 columns=999  endif  


Solution:5

Also it is a good way to use vim-qt behalf of gvim It support full screen and a lot more feuture See https://bitbucket.org/equalsraf/vim-qt/wiki/Home


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »