Closed mrt181 closed 8 years ago
These commands all work from cygwin
mrt181@windowsmachine ~
$ ack -i --smart-case --nogroup --nocolor --ignore-dir='.git, .cabal-sandbox, .stack-work' Hello\ unite.vim!
.vim.bak/test.txt:1:Hello unite.vim!
mrt181@windowsmachine ~
$ ack -i --smart-case --nogroup --nocolor --ignore-dir='.git, .cabal-sandbox, .stack-work' Hello\ unite.vim! .
.vim.bak/test.txt:1:Hello unite.vim!
mrt181@windowsmachine ~
$ ack -i --smart-case --nogroup --nocolor --ignore-dir='.git, .cabal-sandbox, .stack-work' Hello\ unite.vim! .vim.bak/
.vim.bak/test.txt:1:Hello unite.vim!
But with unite.vim it only works when I give a target that is not
.
E.g.
:Unite grep
Target: .
Pattern: hello\ unite.vim
[unite.vim] [grep] ack: : No such file or directory
:Unite grep
Target: .vim.bak/
Pattern: hello\ unite.vim
.vim.bak/test/txt 1 Hello unite.vim!
I have already thrown away my vim setup and reinstalled everything but the problem does not go away
These commands all work from terminal
mrt181@ubuntumachine ~
$ ag -i --smart-case --nogroup --nocolor --hidden --ignore '.git' --ignore '.cabal-sandbox' --ignore '.stack-work' hello\ unite.vim
.vim.bak/test.txt:1:Hello unite.vim!
mrt181@ubuntumachine ~
$ ag -i --smart-case --nogroup --nocolor --hidden --ignore '.git' --ignore '.cabal-sandbox' --ignore '.stack-work' hello\ unite.vim .
.vim.bak/test.txt:1:Hello unite.vim!
mrt181@ubuntumachine ~
$ ag -i --smart-case --nogroup --nocolor --hidden --ignore '.git' --ignore '.cabal-sandbox' --ignore '.stack-work' hello\ unite.vim .vim.bak/
.vim.bak/test.txt:1:Hello unite.vim!
But with unite.vim it does not regardless of the taget I provide E.g.
:Unite grep
Target: .
Pattern: hello\ unite.vim
[unite.vim] [grep] ERR: Error stat()ing: hello\ unite.vim
[unite.vim] [grep] ERR: Error opening directory hello\ unite.vim: No such file or directory
:Unite grep
Target: .vim.bak/
Pattern: hello\ unite.vim
[unite.vim] [grep] ERR: Error stat()ing: hello\ unite.vim
[unite.vim] [grep] ERR: Error opening directory hello\ unite.vim: No such file or directory
I have already thrown away my vim setup and reinstalled everything but the problem does not go away
Unfortunately, I cannot reproduce the problem.
@mrt181 Please execute <C-a>
in the unite buffer normal mode.
It is unite executed command line. And you can execute it from the cmdline.
let g:unite_source_grep_default_opts =
\ '-i --vimgrep --smart-case --nocolor --nogroup --hidden ' .
\ '--ignore ''.svn'' --ignore ''.git'' ''.cabal-sandbox'' --ignore ''.stack-work'''
It must be:
let g:unite_source_grep_default_opts =
\ '-i --vimgrep --smart-case --nocolor --nogroup --hidden ' .
\ '--ignore ''.svn'' --ignore ''.git'' --ignore ''.cabal-sandbox'' --ignore ''.stack-work'''
Ok, I see that the executed commandline does not contain the specified target.
Ok, i was able to fix the problem.
I had to errors in the unite config
This missing --ignore before ''.cabal-sandbox'' when using ag Wrong dir list for --ignore-dir when using ack
The errors in unite were not helpful and the wrong ack config did not produce an error on the commandline.
Fixed options
let g:unite_source_grep_default_opts =
\ '-i --vimgrep --smart-case --nocolor --nogroup --hidden ' .
\ '--ignore ''.svn'' --ignore ''.git'' --ignore ''.cabal-sandbox'' --ignore ''.stack-work'''
let g:unite_source_grep_default_opts =
\ '-i --smart-case --nogroup --nocolor --ignore-dir={.git, .cabal-sandbox, .stack-work}'
OK. But I cannot improve it...
You don't need to, it was my error. Thank you for your help and all your awesome plugins
Unite grep does not work with the
it works and gives me the searched pattern in the test file.
But when I do this from inside vim
I get this message with ack
and this with ag
When I disable ag and ack in .vimrc and do this from inside vim
I get this message with grep
BUT when I do this
I get this message with grep and ack and end up in INSERT mode in the unite window
ag still gives me this
So it looks like that unite.vim is not expanding the target . and this causes issues.