Comments (6)
Which handler are you using? Have you tried others?
from vim-dispatch.
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.
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.
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.
I wait to close the issue until it's actually fixed but I guess that's just me.
from vim-dispatch.
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
from vim-dispatch.
Related Issues (20)
- Vim hangs and process doesn't complete HOT 11
- Terminal strategy with debugger capability HOT 3
- Crazy characters from dotnet run inside tmux only HOT 1
- Cannot close last window HOT 4
- preemtively kill previous command before dispatching HOT 1
- ctrl-c of a ":Make" dispatched command immediately terminates command HOT 3
- Running dispatch in neovim opens quickfix list in vim pane not tmux HOT 2
- Running :Make resets `scrolloff` to 0 HOT 2
- The video on Vimeo is not rated. HOT 1
- [Question] Is there a configuration to jump from error to the existing buffer on a file? HOT 1
- Is one of the mappings supposed to run the last thing you dispatched? HOT 8
- [Feature Request] post hook for async commands HOT 1
- [Feature Request] customize exit_cb on terminal strategy HOT 8
- Have an option to use an interactive shell on :Dispatch HOT 3
- How check if the command succeeded? HOT 20
- Empty quickfix list with :Dispatch! and Make!
- Jump to errors produced by sanitizers and CTest
- How to properly filter output with errorformat HOT 1
- xterm/x11 strategy failing due to xterm which parses arguments badly argument parsing HOT 1
- Default flags for a command
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-dispatch.