Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gVim 7.3 in fullscreen mode

Tags:

vim

fullscreen

I'm using the script to open gVim in fullscreen downloaded from here: http://www.vim.org/scripts/script.php?script_id=2596.

I've also added this line to the startup settings:

:call libcallnr("gvimfullscreen.dll", "ToggleFullScreen", 0)

When running gVim with this setting, I get the following error:

Error detected while processing _virmc:
E364: Library call failed for "ToggleFullScreen()"

Is there anything else I need to do with the files from that script? If I need to compile it somehow, would like someone to guide me through that process as I'm fairly new to Vim. Thanks!

Edit: I'm running Windows 7

like image 257
raphnguyen Avatar asked Dec 26 '12 17:12

raphnguyen


4 Answers

I guess you mean ~/.vimrc or ~/.gvimrc by "startup settings". When that is executed, the GUI isn't initialized yet. Try delaying the execution with an autocmd:

:autocmd GUIEnter * call libcallnr("gvimfullscreen.dll", "ToggleFullScreen", 0)
like image 169
Ingo Karkat Avatar answered Oct 26 '22 11:10

Ingo Karkat


It doesn't seem to be working if you place that call line in your vimrc. It should be called after Vim has finished loading. I suggest using that mapping from the readme:

map <F11> <Esc>:call libcallnr("gvimfullscreen.dll", "ToggleFullScreen", 0)<CR>

It worked for me.

like image 21
mihai Avatar answered Oct 26 '22 10:10

mihai


I had the same problem when I was install this script through Vundle.
It's solved the problem:

Copy the DLL to the folder where GVIM.EXE is located.

like image 2
isvforall Avatar answered Oct 26 '22 10:10

isvforall


An alternative to copying the gvimfullscreen.dll to the executable directory is to specify the file path, like this:

call libcallnr(expand("$VIM") . "/bundle/gvimfullscreen_win32/gvimfullscreen.dll", "ToggleFullScreen", 0)

In this example, I'm using $VIM and the bundle directory, but you can change this to a full path, or use another variable/path that works better for you.

like image 2
Christian Rondeau Avatar answered Oct 26 '22 11:10

Christian Rondeau