WolfgangMehner / vim-plugins

Vim plug-ins which offer support for various programming languages.
415 stars 96 forks source link

C-Support: Lines added for cmake and doxygen in _vimrc give error on gvim startup #33

Closed aks2161989 closed 7 years ago

aks2161989 commented 7 years ago

I am a Windows 10 user and have installed the c-support plugin. As advised in the link, to enable cmake and doxygen, i added the following lines to my _vimrc:

let g:C_UseTool_cmake = 'yes' let g:C_UseTool_doxygen = 'yes'

Now, when I start up gvim, I get an error dialog box with the message:

Could not load the tool "cmake" (Vim(let):E117: Unknown function: mmtoolbox#make#Interface)- occurred at C:\Users\Satyendra\Vim\vimfiles\autoload\mmtoolbox\cmake.vim, line 219

If I do not add these lines to the _vimrc, I do not get the error message.

WolfgangMehner commented 7 years ago

Do you also have the Make-Tool installed? There should be a file named autoload/mmtoolbox/make.vim, found right next to the other files autoload/mmtoolbox/cmake.vim and autoload/mmtoolbox/doxygen.vim. The CMake-Tool requires it for tab-completion of the make targets.

WolfgangMehner commented 7 years ago

Another possibility. Please run this on the Vim-Cmd.-Line:

:MakeSettings

Probably make is not executable, and then the Make-Tool does not get initialized right. I will fix this.

aks2161989 commented 7 years ago

Yes, there is a C:\Users\Satyendra\vim\vimfiles\autoload\mmtoolbox\make.vim file (I checked it).

When I enter the :MakeSettings command in gVim, I get the following result:

Make-Support settings

plug-in installation : toolbox on windows
make executable : make (not executable)
using toolbox : version 1.2 by Wolfgang Mehner

Make-Tool, Version 1.1 / Wolfgang Mehner / wolfgang-mehner@web.de
WolfgangMehner commented 7 years ago

This hopefully fixes the issue: 7bf255e51e30d049983358f6667ed45581b5c043 You can use this repo with a plug-in manager, or download the fix here: https://raw.githubusercontent.com/WolfgangMehner/vim-plugins/7bf255e51e30d049983358f6667ed45581b5c043/autoload/mmtoolbox/make.vim

Tab-completion of make targets when using :CMake should also work, after the build location has been set appropriately.

aks2161989 commented 7 years ago

I copied the contents of make.vim from your link and pasted it inside the C:\Users\Satyendra\vim\vimfiles\autoload\mmtoolbox\make.vim file. Now, there is no error message when i start up gVim.

Since I am a beginner to gVim and to C++, I don't know how to use :CMake and about tab-completion (I only use compile and run). However, there are no more error messages. Thank you for your help!

WolfgangMehner commented 7 years ago

Your welcome.