Vim using Syntastic plugin 'mpi.h' not found - vim

I'm currently using Vim 7.4 on Ubuntu 16.04. I have the Syntastic plugin installed via pathogen.
I'm currently doing some coding in C using the mpi library. When I write my code using Vim, syntastic seems to believe that there is an error and tells me that "'mpi.h' file not found" (this is for #include <mpi.h>). I know that this program compiles as I'm able to run mpicc successfully.
When I run a locate mpi.h this is what I get back:
/usr/lib/openmpi/include/mpi.h
/usr/lib/openmpi/include/openmpi/ompi/mpi/fortran/mpif-h/prototypes_mpi.h
/usr/src/linux-headers-4.4.0-62/include/linux/mpi.h
/usr/src/linux-headers-4.4.0-66/include/linux/mpi.h
How can I get Vim to stop giving me these errors?

Create a file .syntastic_cpp_config in your project home folder.
Have all your include folders listed in it. In your case,
-I/usr/lib/openmpi/include
Or the other folder with mpi.h, whichever you use in your build.

Related

vimrun.exe not found in your $PATH

I recently got vim and have been trying to install some plugins. I installed vim as a plugin manager. I entered some plugins in the _vimrc file just like you are supposed to.
Example: Plugin 'scroolose/nerdtree'
But, when I did :PluginInstall I got a popup saying "vimrun.exe not found in your $PATH". I found the vimrun.exe file and it was not in the right place so I moved it to the vimfiles folder and then the bundle folder and then the Vundle.vim folder I always got the same popup.
After getting the popup message the plugins never install properly. I always get a bunch of errors as vim tries to process the plugins and then at the end it says "done!". When I try using the plugins it never works and it seems like the plugins never got installed.
If you could also help me with my vim syntax problem, that would be great.(only if you wish to)>

How do I get rid of this message in Vim when I'm working with golang files with Janus vim?

I use Vim to open up a hello.go file (using the nerdTree plugin included with janus vim distro) and get "vim-go: could not find 'gotags'. Run :GoInstallBinaries to fix it.". I'm using gvm. I can get golang to run with gvm. How do I install GoInstallBinaries with gvm to get rid of this message? I'm pretty new to golang, so I'm just trying to get up and running.
Do what sberry says. In command-mode, hit : and type GoInstallBinaries, and hit enter. That should install everything.

Specifying coqtop path for CoqIDE Vim plugin on Windows 8.1

I am trying to make the CoqIDE Vim plugin work on Windows 8.1. When I source the plugin from Vim, I get this error message:
coqtop.opt: command not found.
So I looked up the plugin documentation, and found the part that seems relevent:
"coqtop" should be accessible on PATH. If "coqtop" is not in your PATH, add 'let CoqIDE_coqtop = "/path/to/coqtop"' in your "~/.vimrc".
I'm not sure what this means, but I'm guessing that there is some file or directory named coqtop that must be made visible to vim. So I opened my Coq installation directory and searched for coqtop. The search hits are:
coqtop
coqtop.cmi
coqtop.1
coqtop.byte.1
coqtop.opt.1
The obvious first candidate here is coqtop. When I click it, it opens an interactive Coq console. But when I use the let CoqIDE_coqtop command to link this file to Vim and load the plugin again, I get:
C:Program Files (x86)Coq^Hincoqtop.exe: command not found.
Another thing that looks problematic is the file type. As you can see from the error message above, the coqtop file has an .exe extension, which is specific to MS-DOS and Windows. But I don't think the plugin was written to work with .exe files...
I also tried using all the other search hits as coqtop, to no avail.
Does this mean that the plugin is useless on Windows? If someone can confirm that I'll just give up and use other IDEs. But if possible I'd really, really like to keep using Vim.

How do I open Vim using Command?

I just downloaded and started using Vim so I'm still a bit confused with it. I've been watching tutorial videos and I see that I can open Vim by typing vim in command. However when I do it I get
'vim' is not recognized as an internal or external command, operable program or batch file
Did I need to install something else? Also I want to code and compile C in vim, would I need to install a compiler?
You have to invoke Vim (or gvim, the GUI application) with the full path, e.g.
"C:\Program Files\vim\vim74\vim.exe"
The Vim installer doesn't add the location to the PATH. In Windows, you can create a shortcut (*.lnk) in your Start Menu, or re-run "C:\Program Files\vim\vim74\install.exe", which has an option to install batch files to C:\Windows, or manually add "C:\Program Files\vim\vim74" to your PATH via the Control Panel.
Vim is just a (very advanced and powerful) text editor, so it ships with syntax highlighting for most programming languages, but unlike IDEs, it doesn't come with the full toolset of compiler, linker, debugger, etc. You need to separately install that (e.g. mingw, or Microsoft's compiler from the Windows SDK, or any other).
C:\>vim somefile.txt
During Vim (for Win32) install, you have the option to install batch files for launching vim from the command-line.
make sure you install vim properly. (https://www.vim.org/download.php)
On Windows. Don't forget to set the environment variables (simply add \vim\vim**; at the end of the classpath)
Type vim at command line (gvim.exe will start the Graphic user interface software).
If you want to compile and run c program using the command line, you should download the GCC Compiler and follow the same procedure as mentioned before (The classpath thing). Then you can compile C program using gcc command.

How to use MinGW make with Vim on Windows

I have installed Vim and MinGW on my machine, so I try to create Hello World then compile in in Vim and everything work fine. However when I type :make it show error 'make' not recognized as an internal or external command.
I already added variable path to C:\MinGW\bin. I want to know how to configure Vim or my machine to allow make command.
Can you confirm that there is a make.exe in C:\MinGW\bin? I seem to remember that last time I installed mingw, it was called mingw32-make.exe.
If there is no make.exe but there is a mingw32-make.exe, you'll have to change the 'makeprg' option:
:set makeprg=mingw32-make
:make

Resources