Skip to content

Vim plugin to asynchronously run make and display a green/red bar on success/failure

Notifications You must be signed in to change notification settings

jimf/vim-async-make-green

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

vim-AsyncMakeGreen

AsyncMakeGreen is the conceptual marrying of AsyncCommand and makegreen.vim. It provides the means to run makeprg asynchronously, and once the command finishes, display a green bar on success or a red bar on error, jumping to the line of failure.

Installation

Extract files to your ~/.vim directory or use Tim Pope's pathogen.vim.

Requirements

Usage

AsyncMakeGreen adds 1 new command to AsyncCommand:

AsyncMakeGreen

run make against a target and display a green bar on success or a red bar on failure, jumping to the line

Example:

function! MakeTest(target)
    if filereadable('./Makefile')
        silent ! echo
        exec "set makeprg=make\\ NOSE='bin/nosetests\\ --no-color\\ --machine-out'"
        set errorformat=%f:%l:\ fail:\ %m
        exec "AsyncMakeGreen " . a:target
    endif
endfunction

au BufWritePost * if &filetype == "python" | call MakeTest('unit-test') | endif

Configuration

The behavior of this plugin can be tweaked by modifying the following variables:

let g:async_make_green_success_prefix = ' ✓ '
let g:async_make_green_failure_prefix = ' ✖ '
let g:async_make_green_default_success_text = 'All tests passed'
let g:async_make_green_use_make_output_on_success = 0

To modify the bar colors, see the red-green.vim README

Additionally, see :help switchbuf to customize the way the splits from this plugin behave.

License

MIT License

About

Vim plugin to asynchronously run make and display a green/red bar on success/failure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published