I use ag for grep source.
After entering an incorrect regex, e.g. (string, there is an error message from ag:
[grep] Pattern: (Reject
[unite.vim] [grep] ERR: Bad regex! pcre_compile() failed at position 7: missing )
[unite.vim] [grep] If you meant to search for a literal string, run ag with -Q
Press ENTER or type command to continue
After this when i try to use the grep source again, i get this:
Error detected while processing function <SNR>122_toggle_mark:
line 5:
E716: Key not present in Dictionary: unite__is_marked
E15: Invalid expression: !candidate.unite__is_marked
Error detected while processing function <SNR>122_toggle_mark[9]..unite#view#_redraw_line[16]..unite#view#_convert_lines:
line 14:
E716: Key not present in Dictionary: is_dummy ? ' ' : v:val.unite__is_marked ? context.marked_icon : context.candidate_icon) . padding . (unite.max_source_name == 0 ? '' : unite#util#truncate(unite#helper#convert_source_name( (v:
val.is_dummy ? '' : v:val.source)), max_source_name)) . ((strwidth(v:val.unite__abbr) < max_width || !context.truncate) ? v:val.unite__abbr : unite#util#truncate_wrap(v:val.unite__abbr, max_width , truncate_width, '..'))
Error detected while processing function <SNR>122_toggle_mark[9]..unite#view#_redraw_line:
line 16:
E731: using Dictionary as a String
/
Reproducable every time.
Expected
Prompt for new search string
Environment Information
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Feb 12 2016 10:52:22)
MacOS X (unix) version
Included patches: 1-1265
Compiled by Homebrew
+lua
Minimal vimrc less than 50 lines
nnoremap <leader>f :<C-u>Unite -buffer-name=files file_rec/async:!<cr>
nnoremap <leader>g :<C-u>Unite -buffer-name=files file_rec/git:--cached:--others:--exclude-standard<cr>
nnoremap <leader>l :<C-u>Unite -buffer-name=mru file_mru<cr>
nnoremap <leader>m :<C-u>Unite mapping<CR>
nnoremap <leader>u :<C-u>UniteResume<CR>
nnoremap <leader>e :<C-u>Unite -no-start-insert -buffer-name=buffer buffer<cr>
nnoremap <leader>r :<C-u>Unite -buffer-name=register register<cr>
nnoremap <space>/ :<C-u>Unite -no-start-insert grep:.<cr>
let g:unite_force_overwrite_statusline=0
let g:unite_source_rec_max_cache_files=32768
let g:unite_winheight = 20
call unite#custom#profile('files', 'filters', 'sorter_rank')
call unite#custom#profile('default', 'context', { 'start_insert': 1 })
call unite#custom#source('grep', 'max_candidates', 0)
if executable('ag')
let g:unite_source_grep_command='ag'
let g:unite_source_grep_default_opts='--line-numbers --nocolor --nogroup'
let g:unite_source_grep_recursive_opt=''
let g:unite_source_rec_async_command=['ag', '--follow', '--nocolor', '--nogroup', '--hidden', '-u', '-g', '']
endif
" Custom mappings for the unite buffer
function! s:unite_settings()
nmap <buffer> <C-p> <Plug>(unite_toggle_auto_preview)
endfunction
autocmd MyAutoCmd FileType unite call s:unite_settings()
I use
ag
forgrep
source. After entering an incorrect regex, e.g.(string
, there is an error message fromag
:After this when i try to use the grep source again, i get this:
Reproducable every time.
Prompt for new search string