vim command args'LOGICAL interpreter

11 views
Skip to first unread message

Ni Va

unread,
Oct 17, 2017, 3:31:48 PM10/17/17
to vim_use
Hi,

Actually using and calling grep silver search tool from simple command :

command! -bang -nargs=+ -complete=function Search :call o.searchByContent(<q-args>)


Example :
function! foo() abort dict "bar


1. Then when I search foo ':Search foo' => OK

2. Then I would like to avoid typing regex in command args like to search lines that contains foo AND bar.

Instead of ':Search foo.+bar' Can I easily modify my command in order to type
':Search foo AND bar' or ':SearchAND foo bar'

Or do I need to implement interpreter of passed args.

Thank in advance

Reply all
Reply to author
Forward
0 new messages