Monday, December 14, 2015

Re: Why is :E an ambiguous command after upgrading to patches through 965?



2015-12-15 0:44 GMT+03:00 Charles Campbell <Charles.E.Campbell@nasa.gov>:
Tony Mechelynck wrote:
> On Mon, Dec 14, 2015 at 5:00 AM, Tim Chase <vim@tim.thechases.com> wrote:
>> On 2015-12-13 21:02, boB Stepp wrote:
>>> Thanks, Tim!  I did not know that trick.  Apparently the new
>>> command is:
>>>
>>> :ELP {boolean-logic pattern} *:ELP*
>>> No search is done, but the conversion from the
>>> boolean logic pattern to the regular expression
>>> is performed and echoed onto the display.
>>>
>>> Which is apparently part of Logical Patterns, something I'm not
>>> familiar with.
>> This sounds suspiciously like something that might come from Dr.
>> Chip's "LogiPat" plugin, perhaps you have that installed and upgraded
>> it at some point (I have it available, but it's a pretty old version
>> without an ":ELP" command to ?
>>
>> If that's the case, and push come to shove, you can un-command it with
>>
>>    :delcommand ELP
>>
>> to get your unambiguity back.  Alternatively, if you don't use the
>> LogiPat plugin, you should be able to disable it to cut it off at the
>> pass.
>>
>> -tim
> Yes, not only that's part of Dr. Chip's LogiPat plugin, but that
> plugin is now (I don't know since when) distributed with Vim;
> therefore it now lives in $VIMRUNTIME/plugin/ and its help in
> $VIMRUNTIME/doc/. If you want to use :delcommand on it, you would have
> to do that after the plugin has been sourced, thus maybe in a VimEnter
> autocommand set up in your vimrc, or else in some after-plugin (see
> ":help after-directory", and I disagree with the help where it says
> that after-directories are "rarely needed"), let's say (on Linux)
> ~/.vim/after/plugin/logipat.vim or (on Windows, but in Vim notation)
> $HOME/vimfiles/after/plugin/logipat.vim
>
To easily disable LogiPat: put

  let loaded_logiPat= 1

in your .vimrc.  That will prevent logiPat.vim from loading.  Of course,
to re-enable it again, just remove that line (or comment it out).

OTOH, you might want to learn what logiPat provides.  For example,
assume you want to find a line with two patterns in it:

:LP "pat1" && "pat2"

will find such a line (assuming it exists, of course).

Regards,
Chip Campbell

​I am wondering why in this thread people are discussing what to do with logiPat when solution is simple: to use :E as :Explore​ add

    command -nargs=* -complete=dir -bar -count -bang E :Explore<bang> <args>

to the vimrc. Or to the netrw plugin (though in this case I would choose to replace `:Explore…` with `call netrw#Explore(<count>,0,0+<bang>0,<q-args>)` (rhs of the :Explore command itself)).

 

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: