sponsor Vim development Vim logo go to HTTPS page Vim Book Ad

makery.vim : A plugin for managing makeprgs.

 script karma  Rating 1/1, Downloaded by 53    Comments, bugs, improvements  Vim wiki

created by
Ian Emnace
 
script type
utility
 
description
I made this plugin because I was tired of having to change my `makeprg` or
`compiler` every time I wanted to run a different task. Switching between
`:compiler eslint` and `:compiler jest` gets old really fast.

Sure, you can map, but it gets harder when you start to work across different
projects: some use different linters or test runners, some use a Makefile, some
use an `npm` script, some need to generate tags, etc. Madness!

With this plugin, all I have to do is specify my make-related tasks in a
`.makery.json` file in my project root. For example, one of my React Native
projects has the following `.makery.json`:

{
  "lint": {"compiler": "eslint"},
  "reload": {"makeprg": "adb shell input keyevent 82"},
  "tags": {"makeprg": "es-ctags -R src"},
  "test": {"compiler": "jest"}
}

Now I can just run `:Mlint` to lint, `:Mreload` to reload the JS code on my
connected Android device, `:Mtags` to generate tags, and `:Mtest` to run tests.
Nifty!

In case you already have an existing command with the same name, you can still
access the commands through the full `:Makery` form, e.g. `:Makery lint` or
`:Makery compile`.

The best part is I can specify different behavior for `:Mlint` or `:Mtest`
depending on which project I'm in, by providing the necessary `.makery.json` for
each of my projects!

Even programs like ctags or adb fit well because of this, even though you don't
necessarily need the quickfix for them. Instead of fiddling with different `:!`
incantations for different projects, you can just use `:Mtags` and be done with
it!
 
install details
Untar into your ~/.vim directory, or install with your favorite plugin manager (plugin is hosted at https://github.com/igemnace/vim-makery).

Vim 7.0 or higher should be fine. JSON support requires Vim 8.0 or higher.
 

Rating scripts is only available on the HTTPS page

script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
makery.tar.gz 1.5 2017-09-21 7.0 Ian Emnace Expose :Makery command for conflicting existing commands
makery.tar.gz 1.4 2017-09-19 7.0 Ian Emnace Refactor autoload functions
makery.tar.gz 1.3 2017-09-18 7.0 Ian Emnace Fix bug where setting both "compiler" and "makeprg" options fails to actually use the makeprg
makery.tar.gz 1.2 2017-09-18 7.0 Ian Emnace Fix bug with makery#Compile: wrong number of args
makery.tar.gz 1.1 2017-09-17 7.0 Ian Emnace Now allows setting both "compiler" and "makeprg" keys for a single command
makery.tar.gz 1 2017-09-17 7.0 Ian Emnace Initial upload
ip used for rating: 54.162.139.105

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo