Makeshift : Selects the right 'makeprg' for your build system
| script karma |
Rating 2/3,
Downloaded by 136
|
Comments, bugs, improvements
|
Vim wiki
|
| created by |
| Pete Johns |
| |
| script type |
| utility |
| |
| description |
INTRODUCTION
You'll want to use this plugin if you work on a lot of projects with different build systems (Ant, BJam, Make, Maven, Scons, et cetera). You want your editor to be able to detect your current build system and set 'makeprg' accordingly.
To make building really fast, bind the :make command to a function key in your vimrc.
nnoremap <F5> :<C-U>make<CR>
HOW IT WORKS
This plug-in works by looking for known build files in the current working directory upwards, and sets |'makeprg'|; by default this happens on start-up.
You can use the command to re-evaluate |'makeprg'|.
:Makeshift
SETTINGS
To prevent Makeshift from setting |'makeprg'| on start-up, put the following in your |vimrc|.
let g:makeshift_on_startup = 0
To prevent Makeshift from setting |'makeprg'| on |BufRead|, put the following in your |vimrc|.
let g:makeshift_on_bufread = 0
BUILD SYSTEMS
Makshift currently associates the following files with their build systems:
* Jamfile: bjam
* Makefile: make
* Rakefile: rake
* SConstruct: scons
* build.xml: ant
* pom.xml: mvn
ADDING A NEW BUILD SYSTEM
If Makeshift doesn't already know about your build system, or you wish to override the default program for a given file, you can define a dictionary, which has filenames as keys and corresponding programs as values.
let g:makeshift_systems = {
\'build.ninja ': 'ninja',
\}
REMOVING A BUILD SYSTEM
If you don't want Makeshift to set |'makeprg'| for a given build system, you can disable it by defining a list of the files to ignore.
let g:makeshift_ignored = ['Jamfile']
ABOUT
Makeshift was written by Pete Johns. You can contact him via http://johnsy.com/ or on Twitter where he masquerades as @johnsyweb.
You can grab the latest version of this plugin, submit an improvement or report a bug on GitHub:
http://github.com/johnsyweb/vim-makeshift/
LICENSE
Makeshift is licensed under the same terms as Vim itself (see :help license). |
| |
| install details |
I recommend installing pathogen.vim (vimscript#2332), and then simply copy and paste:
cd ~/.vim/bundle
git clone git://github.com/johnsyweb/vim-makeshift.git
Restart Vim and then:
:Helptags
Once help tags have been generated, you can view the manual with
:help makeshift
Alternatively, just unzip the file into your 'runtimepath' and run :helptags. |
| |
script versions (upload new version)
Click on the package to download.
| vim-makeshift-0.6.zip |
0.6 |
2013-05-18 |
7.0 |
Pete Johns |
13d7f84 makeshift_define_command works around issue #2
8c6361a Admit issue
3d36530 Tidy whitespace
|
| vim-makeshift-0.4.zip |
0.4 |
2012-11-25 |
7.0 |
Pete Johns |
* cccc476 - (HEAD, v0.4, origin/master, master) v0.4 (7 minutes ago) <Pete Johns>
* b46c503 - Don't set makeprg=0 if no makefile is found. (7 days ago) <Pete Johns>
|
| johnsyweb-vim-makeshift-v0.3-0-g3ed1848.zip |
0.3 |
2012-10-26 |
7.0 |
Pete Johns |
* 3ed1848 - (HEAD, v0.3, origin/master, master) Bumped version. (5 minutes ago) <Pete Johns>
* ce66a04 - Automatic re-evaluation on BufRead (4 days ago) <Pete Johns>
* 336dfe1 - Dig upwards for build system (4 days ago) <Pete Johns>
|
| makeshift.zip |
0.2 |
2012-10-22 |
7.0 |
Pete Johns |
Issue #1: CMake does not generate a Makefile |
| makeshift.zip |
0.1 |
2012-10-21 |
7.0 |
Pete Johns |
Initial upload |
ip used for rating: 54.242.233.11
|