gVim 7.3 in fullscreen mode - 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

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)

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.

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.

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.

This isn't a direct answer, but after searching for a solution for quite a while, I've decided that the prettiest way to run Vim on Windows is via Cygwin, via the (bundled) mintty terminal. It has a genuine full screen and even transparencies!

Related

nvim finds the function but vim does not

I am using a vim/nvim plugin asyncrun that enables an API call that works fine in nvim if I implement it in ~/.config/nvim/init.vim using a line:
call asyncrun#run("", "cwd", "firefox")
Now this same line does not work for vim if I try to use it inside ~/.vimrc. I always get a warning:
Unknown finction: asyncrun#run
What needs to be changed in order for this to also work for vim?
Following the #doopNudles comment I also clarify that vim plugin is manually installed in the folder ~/.vim/pack/my-plugins/start/vim-asyncrun/asyncrun.vim/plugin/asyncrun.vim. I install all my vim plugins the same way (using the vim v8 native ability to detect plugins).
The problem was that ~/.vim/pack/my-plugins/start/vim-asyncrun/asyncrun.vim/plugin/asyncrun.vim has one extra folder!
It works if I delete the extra folder asyncrun.vim like this ~/.vim/pack/my-plugins/start/vim-asyncrun/plugin/asyncrun.vim

Cannot load CoqIDE plugin for vim

I'm trying to use the CoqIDE for vim plugin I found on this page.
I put the coq_IDE.vim file in ~/.vim/ftplugin folder. My current .vimrc file is:
set showcmd
set number
imap hl <Esc>
filetype plugin on
But when I start vim CoqIDE doesn't load automatically (I see no change whatsoever compared to normal vim, so I don't think it did). And when I try to load it manually by the command :source coq_IDE.vim, I get the following error message:
E484: Can't open file coq_IDE.vim
What could be the source of this error?
Here are some additional information that might be relevant:
1) I am running Ubuntu 14.04.
2) I checked that :version in vim shows +perl.
2) I am running vim from terminal, not gvim.
3) I tried removing and reinstalling different versions of vim (vim, vim-gtk, vim-gnome)
4) The CoqIDE installation guide says that coqtop.opt should be accessible via the PATH variable. Since I'm not even sure what this means, this might be the problem here, but that seems unlikely. From what I understand vim is getting errors when trying to read coq_IDE.vim, so it's not even getting to the part where it's looking for coqtop.opt.
5) I have CoqIDE installed from Ubuntu Software Center.
6) With :echo &runtimepath I get: ~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after
The instructions are bad.
Put the file in ~/.vim/plugin not ~/.vim/ftplugin
The file layout should look exactly like the file layout found in this mirror for the plugin. https://github.com/vim-scripts/CoqIDE. (Maybe take a look at pathogen or vundle,).
The reason the :source coq_IDE.vim fails is vim is looking for the file coq_IDE.vim in the current directory and it isn't there. Use the full path to file if you are going to source it manually. (You shouldn't need to though.)

Unable to use fugitive.vim on gVim on Windows 7

I am using gVim on Windows 7 and I have tried installing fugitive.vim as described here.
As per the link , I have extracted fugitive.vim to
vim73/plugin folder which is in the runtime path for my gVim. But when I restart the gVim, I get "Not an editor command" message when I type in :Gedit , or :Git and also :h fugitive isn't giving a help page.
Also, I tried using the recommended pathogen.vim method as described here. I extracted pathogen.vim into my vim73/autoload folder and then created a bundle folder in gVim home directory(c:\Program Files\Vim). I extracted fugitive.vim into the bundle folder.
Updated the _vimrc file with the execute pathogen#infect() command and restarted gVim, but no luck..
Please help me understand where I am going wrong.
I have found it difficult to get fugitive working on Windows.
I do have a few things for you to try, found using :h plugin.
:echo has("eval")
If this returns 0, your build of vim/gvim does not support plugins.
:echo g:loaded_fugitive
If this returns an error, vim did not spot your plugin during start, check :h plugin for correct directories to install to.
If this returns 1, as mine did and it still did not work, try adding set shellslash to your .vimrc file. This got mine working.

Vim: Recommendations for vimball plugins in pathogen

I plan to switch to vim 7.3 in the next days on my windows box - linux will soon follow. I also plan to switch my vim setup and let pathogen handle my plugins.
I've googled but not yet found a solution how to handle plugins using vimball technique for setup. Any hints?
You are looking for :UseVimball [path]
Open the vimball up with vim. Instead of sourcing it with :so % do
$ vim somthing.vba
:!mkdir ~/.vim/bundle/bundle-dir-name-here
:UseVimball ~/.vim/bundle/bundle-dir-name-here
Note you will have to make sure the path exists before you execute this command.
:h :UseVimball
You can try vim-addon-manager: it is able to put every plugin in a separate directory and correctly handles Vimball.

How can I debug a Vim plugin not being loaded?

I'm trying to use the Vim snipMate plugin, and I've installed it as it directs, but when I press tab nothing happens.
How can I debug this? Are there log files Vim makes when it tries to load stuff?
How can I see what plugins its loaded correctly?
I've tried :sni<tab> to see if there's anything called snipsomething installed but nothing completes.
In the installation tutorial it doesn't mention adding anything into my vimrc but I guess it finds the /plugin/ dir automatically?
I'm running on Windows and Unix and I have the same profile with the same problem.
Other plugins like NerdTree are loading OK.
Update: Following another question, I've tried :inoremap and :snoremap and the <Tab> entry mentioning TriggerSnippet() is there:
e.g.
s <Tab> * <Esc>i <Right><C-R>=TriggerSnippet()<CR>
Does this mean it's enabled?
:verbose imap <tab>
will tell you what is bound to <tab>
:scriptnames will tell you what scripts were loaded.
You can insert echo "Loaded so far" and the like inside the plugin code - the text will be displayed in the bottom line if the echo is executed. Debugging by printf :) Crude, but simple and works.
Also: plugin is loaded automagically. plugins is not.
It looks like I had something dodgy in C:\Program Files\Vim\vimfiles\ directory which was superceding my user preferences. I just blew away that directory and it works now.

Resources