On 06/04/09 22:15, Bram Moolenaar wrote:
>
>
> Tony Mechelynck wrote:
>
>> Cannot jump to a helptag containing a dash.
>>
>> Example: version5.txt defines *new-script*. But if you hit Ctrl-] on
>> |new-script|, Vim will either give an error (if the cursor is on new) or
>> take you to *script* in usr41.txt (if the cursor is on -script).
>>
>> Using Huge 7.2.148 on Linux.
>>
>> When displaying version5.txt, 'iskeyword' is at its Unix default,
>> @,48-57,_,192-255
>>
>> I haven't (yet) tested what would happen with a
>> $VIM/vimfiles/after/ftplugin/help.vim defining the dash as part of
>> 'isk'. Maybe other characters should be included too? Hm., I guess the
>> paragraph
>>
>>> For a help file it is set to all non-blank printable characters except
>>> '*', '"' and '|' (so that CTRL-] on a command finds the help for that
>>> command).
>>
>> (under 'iskeyword') ought to be implemented via a filetype-plugin rather
>> than a modeline. I guess this would mean
>>
>> setl isk=33-127,161-255,^*,^\",^\|
>>
>> wouldn't it? (i.e., excluding control characters 0-0x1F and 0x80-0x9F,
>> plus space, no-break space, star, double-quote and bar, and including
>> the rest).
>
> The idea is that you open the help file with ":help" and then all the
> options are set properly. If you edit the help file in another way the
> 'iskeyword' value indeed is not the right one for help files. But then
> CTRL-] also doesn't use the tags file for help.
Ah, that's what happened. I opened it with ":0verbose vimgrep
/\<func\%[tion]\>/g $VIMRUNTIME/doc/version*.txt, hoping to both reduce
processing time and eliminate spurious quickfix entries compared to
seaching for the same pattern with ":helpgrep".
>
> I suppose setting 'iskeyword' in the help filetype plugin makes sense.
> Note that it does make editing a bit different, especially for word
> movements. That's why punctuation sometimes goes missing when I'm not
> careful about this.
Hm., in case of doubt we can either use visual mode (and double-check
what gets highlighted), or check afterwards that the result of the edit
jibes with what we expected. Yes, you said it: carelessness can give
problems, and not only in this case.
Best regards,
Tony.
--
Velilind's Laws of Experimentation:
(1) If reproducibility may be a problem, conduct the test only
once.
(2) If a straight line fit is required, obtain only two data
points.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---