Code Monkey home page Code Monkey logo

Comments (6)

tpope avatar tpope commented on May 30, 2024

Which handler are you using? Have you tried others?

from vim-dispatch.

hsanson avatar hsanson commented on May 30, 2024

I tried the headless handler by adding this to my vimrc:

let g:dispatch_handlers = [ 'headless' ] 

and also the screen handler with the following in my vimrc and inside a screen session:

let g:dispatch_handlers = [ 'screen' ] 

In both cases the build process blocked vim. Only with tmux I get a nice pane showing the build process without blocking vim.

With the headless handler it behaves exactly as :make. Vim seems to be backgrounded and the build process takes place. When finished vim is restored back with the quickfix window open.

With the screen handler vim is not backgrounded. Instead the build process is displayed at the bottom of the vim editor (the status line?) and when finished the quickfix window is opened.

In both cases the quickfix window output is not mangled and I can jump between errors correclty.

from vim-dispatch.

tpope avatar tpope commented on May 30, 2024

So neither headless nor screen support foreground builds; they only work with :Make!. Not sure why they differ but between monkeying with g:dispatch_handlers and the insistent usage of silent! I'm not surprised.

As far as tmux goes, that adapter is actually the only one to not respect 'shellpipe', instead opting to capture the entirety of the tmux pane. This should probably be fixed to only do that if 'shellpipe' is something akin to 2>&1. The two changes needed are in dispatch#tmux#make(): drop the second argument to dispatch#prepare_make() and the tmux pipe-pane business and it should just work.

Incidentally, the whole reason for this pipe-pane dance is to enable colors to show. They're stripped out of the captured output by sed. We could certainly strip out these other escape codes too, but I'm not sure the result would be acceptable.

from vim-dispatch.

hsanson avatar hsanson commented on May 30, 2024

Indeed with the changes you mention everything works perfectly. Here are the changes I made:

diff --git a/autoload/dispatch/tmux.vim b/autoload/dispatch/tmux.vim
index 3298320..5a89dc8 100644
--- a/autoload/dispatch/tmux.vim
+++ b/autoload/dispatch/tmux.vim
@@ -33,7 +33,8 @@ endfunction

 function! dispatch#tmux#make(request) abort
   let session = get(g:, 'tmux_session', '')
-  let script = dispatch#isolate(dispatch#prepare_make(a:request, a:request.expanded))
+  " let script = dispatch#isolate(dispatch#prepare_make(a:request, a:request.expanded))
+  let script = dispatch#isolate(dispatch#prepare_make(a:request))

   let title = shellescape(get(a:request, 'compiler', 'make'))
   if get(a:request, 'background', 0)
@@ -54,7 +55,8 @@ function! dispatch#tmux#make(request) abort
     let filter .= ' -u'
   endif
   let filter .= " -e \"s/\r//g\" -e \"s/\e[[0-9;]*m//g\" > ".a:request.file
-  call system('tmux ' . cmd . '|tee ' . s:make_pane . '|xargs -I {} tmux pipe-pane -t {} '.shellescape(filter))
+  " call system('tmux ' . cmd . '|tee ' . s:make_pane . '|xargs -I {} tmux pipe-pane -t {} '.shellescape(filter))
+  call system('tmux ' . cmd . '|tee ' . s:make_pane )

   let pane = get(readfile(s:make_pane, '', 1), 0, '')
   return s:record(pane, a:request)

from vim-dispatch.

tpope avatar tpope commented on May 30, 2024

I wait to close the issue until it's actually fixed but I guess that's just me.

from vim-dispatch.

fabOnReact avatar fabOnReact commented on May 30, 2024

in my case using gradlew I had to add org.gradle.console=plain in my gradle.properties

https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties

CLICK TO OPEN TESTS RESULTS

BEFORE
AFTER

from vim-dispatch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.