mileszs / ack.vim

Vim plugin for the Perl module / CLI script 'ack'
Other
3.08k stars 396 forks source link

Error and no focus on quickfix window when using :Ack #129

Closed obreitwi closed 10 years ago

obreitwi commented 10 years ago

Currently, when using :Ack the following two lines are prepended to the results in the quickfix window and the focus remains in the current buffer.

|| sh: module: line 2: syntax error: unexpected end of file
|| sh: error importing function definition for `module'

My ack.vim configuration:

let g:ackprg = 'ag --nogroup --nocolor --column --follow'
let g:ack_wildignore=0

I am using vim with ag instead of ack within tmux and have vim-dispatch installed. My current full vim configuration can be found here: obreitwi/dot_vim.git@a8c0476065

I suspect the error got introduced when vim-dispatch functionality was added since this is the latest commit without the error: mileszs/ack.vim@6bafadd.

kassio commented 10 years ago

Could you try with last version. But now if you want to use vim-dispatch you must set g:ack_use_dispatch.

obreitwi commented 10 years ago

I set let g:ack_use_dispatch=1 but still receive the error.

Additionally all search results are now also prefixed with || and I cannot navigate to the search match by pressing enter.

obreitwi commented 10 years ago

As a follow up: I still have the two || sh: lines appearing in the quickfix list, but the focus is properly shifted to the first result (in line 3) and I can properly navigate them.

Could the cause for the two error lines lie with dispatch itself?

kassio commented 10 years ago

I tried use your vim setup but it killed my vim:

$ vi
dyld: lazy symbol binding failed: Symbol not found: _rb_encdb_declare
  Referenced from: /Users/kassioborges/.rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/enc/encdb.bundle
  Expected in: flat namespace

dyld: Symbol not found: _rb_encdb_declare
  Referenced from: /Users/kassioborges/.rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/enc/encdb.bundle
  Expected in: flat namespace

If you found more information about it, please let me know