Thursday, December 5, 2013

Re: Is word character redefined in netrw?

Paul wrote:
> On Thursday, December 5, 2013 11:25:02 AM UTC-5, ZyX wrote:
>> On Dec 5, 2013 7:36 PM, "Paul" <paul.d...@gmail.com> wrote:
>>> According to ":help pattern", a word character is defined as
>>> [0-9A-Za-z]. When I press # or *, the search pattern becomes
>>> \<WordUnderCursor\>. The word WordUnderCursor highlights on all
>>> windows except for the netrw window (where there is a file named
>>> WordUnderCursor.m). However, if I remove the anchors to the
>>> beginning and end of the word in the search pattern,
>>> WordUnderCursor becomes highlighted in the netrw window. I did not
>>> think that netrw redefined some setting representing word
>>> characters (e.g, perhaps isword) to include the dot in
>>> WordUnderCursor.m, and I confirmed that there is not isword option.
>>>
>>> How does netrw prevent \<WordUnderCursor\> from matching
>>> WordUnderCursor.m, and is there a way to prevent this prevention?
>> According to help \> uses &iskeyword, not &isword (in fact, I do not
>> know such a thing as &isword). You may override it in
>> .vim/after/ftplugin/netrw.vim, but you are likely to destroy syntax
>> highlighting in this case and maybe something else. Note that word
>> character definition is based on &iskeyword. \w has nothing to do
>> with vim word definition, see :h word and *not* :h pattern.
> OK, thanks for the warning. I'll live with the current iskeyword until...well, until late one night when I frustrated and dare to try changing it. With luck, I may find that nothing much breaks other than cosmetics.
>
Files may have "decorations" indicating what type they are: file,
directory, link, etc. Netrw manipulates isk in its own window to
support not trying to use those decorations as part of the filename. If
you dropped the "." from netrw's isk, NetrwGetWord() would no longer
pick up the entire filename when the filename included a ".".
In short, not a good idea IMHO.

Regards,
C Campbell

--
--
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/groups/opt_out.

No comments:

Post a Comment