Skip to content

quickfix errorformat doesn't work for dispatch #41

Closed
@lengarvey

Description

@lengarvey

:Dispatch populates quickfix but doesn't seem to apply the errorformat in the same way as simply using :cgetfile

Fake steps to reproduce

Given the following file at /tmp/fake_errors

file_one.rb:1: Fake error one
file_two.rb:2: Fake error two
file_three.rb:3: Fake error three

In Vim:

:let &errorformat = '%[ #]%#%f:%l:%m'
:Dispatch cat /tmp/fake_errors

Doesn't work.

:let &errorformat = '%[ #]%#%f:%l:%m'
:cgetfile /tmp/fake_errors

Does.

My actual problem

What I'm trying to do here is apply a custom formatter to rspec and display the errors nicely in quickfix style.

A gif demonstrating my issue

quickfix_issue

I ran the same test with only NeoBundle and vim-dispatch enabled and without any extra vimrc stuff beyond the default and I get the same results.

The rspec formatter I'm using can be found: https://github.com/lengarvey/vimrc/blob/master/config/ruby/vim_rspec2_formatter.rb it's not working yet since I can't figure out how to get this errorformat stuff applying correctly.

Steps to reproduce:

:Dispatch bundle exec rspec -r $HOME/.vim/config/ruby/vim_rspec2_formatter.rb -f VimFormatter

Observe that the quickfix window doesn't appear to have the errors linked as expected.

Expected results

:!bundle exec rspec -r $HOME/.vim/config/ruby/vim_rspec2_formatter.rb -f VimFormatter > /tmp/tmpfile
:cgetfile /tmp/tmpfile

Am I doing something obviously wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions