My understanding is that the makeprg setting is primarily used to change the actual make/build program and in your case the program isn't changing...it's always 'make'.
Since :make accepts arguments I suggest leaving 'makeprg' alone and passing your build command args to :make in the two mappings...
noremap <F4> :make -f ~/makefile1 %<<CR>
Google for vim to find their homepage. You find http://www.vim.org .
Look on their homepage, where is their upstream source. If you have luck, they are on the github.
On the "Download" section, they show many of their upstreams, first is the github one.
They say, git clone https://github.com/vim/vim.git is the clone command what you want, however you want ...
You can find the instructions to build Vim on windows in the source file src/INSTALLpc.txt.
More specifically in the section 8. Building with Python3 support you can read:
8. Building with Python3 support
For building with MSVC 2008 the "Windows Installer" from www.python.org
works fine. Python 3.6 is recommended.
As @muru has suggested, I will post the solution here..
The situation happened, when I was trying to debug a issue related to a plugin. It seemed to work for a colleague, but not for me. So one of the hypothesis was that it was because of the differing versions of VIM.
Because the VIM version (8.0.1430) was compiled from source, I had the exact SHA id of ...
Following instruction here and install appropriate package and set appropriate flags:
We can just do :make %< and !./ %< to build and compile cpp file
I somehow figured out what was going on.
The problem was due to a trailing whitespace at the very end of the keybinding. That was acting as extra key to escape back from the terminal. Removing it resolved the issue.
The problem was solved.
The :python3 or :pythonx (:py3 or :pyx) should be used instead of the simple :python.
See :h python3 and :h pythonx.
So, :py3 print("hello") gives hello as expected.
Also, to see what version of Python is being used, do:
:pyx import sys
in my case it gives
3.6.9 (default, Nov 7 2019, 10:44:02)
It's all in :h :version and :h +feature-list
The first column shows the smallest version in which
they are included:
T tiny (always)
m manually enabled or depends on other features
(none) system dependent
N *+startuptime* |--startuptime| argument
It requires version no less ...
I worked around this problem by using the compile switch:
However, obviously it is just a workaround and the test failure will be a problem for anyone that wants to use netbeans with compiled vim.
To configure the build the script configure in the root of the source tree is used.
This script supports the option --help. It will print the available options with explanation.
So: cd to the root of the source tree and run:
$ ./configure --help
`configure' configures this package to adapt to many kinds of systems.
Usage: auto/configure [OPTION]... [VAR=...
To get a one column list of Vim's compile options you could use this script:
1 #! /bin/bash
5 while read -r line || [[ -n "$line" ]]; do
6 line4=$(echo $line | perl -p -e 's/ +/ /g')
7 for one in $line4
9 echo $one
14 vim --version | grep '^[+-]' | splitme | sort --key=1.2
Compile Vim via MacPorts
Macports provides currently a more granular installation approach for vim than homebrew:
It offers the feature variants tiny, small, big, and huge.
You can add specifically the interfaces for ruby, perl, lua, python.
For all variants see
However, you can add this ...
This is really strange. Basically:
in my compiled vims, as long as I run py import vim, vim becomes defined thereafter and everything works.
So I can probably just add this statement in my vimrc and move on with my life.
There must be some undocumented compile or config flag that makes this happen automatically by default or something.
I assume that you don't have the needed libraries installed on your system to build a gui. If you read the file src/INSTALL it explains the different --enable-gui options.
For example for me I could run ./configure --enable-gui=kde && make just fine but the resulting vim did not have a gui. When I checked ./configure --enable-gui=kde | grep gui I ...