Wednesday, January 13, 2021

Re: fault in * in perl files (.pl)

------ Original Message ------
From: "'Paul' via vim_use" <vim_use@googlegroups.com>
To: vim_use@googlegroups.com
Sent: Wednesday, 13 Jan, 2021 At 21:40
Subject: Re: fault in * in perl files (.pl)

On Tue, Jan 12, 2021 at 03:24:52PM +0000, 'c.willis111@btinternet.com' via vim_use wrote:
in .pl files vim includes colon (:) in the identifier character set. This is sort of reasonable, as perl identifiers include those of the form /\w+::\w+/ .

Unfortunately this prevents search finding the next relevant entry in (where the search is started with a * on intl1.):

$intl1 = $intobl + 1 ; # new 12 Jan 2021
s/(\d+)/$1==4?$intl1:$row/eg ; # revised 12 Jan 2021
Can this be changed to only accept double colons as part of an identifier in a * search?

No. The subject you're looking for is :help 'iskeyword', and see 'isfname' for its format. It's a list of single characters that consist a keyword, there's no "but not a double character" option, unfortunately.

Hi Paul

thanks for that. I've added an au FileType perl set iskeyword-=: to my .vimrc. I can live with adjusting the / if I need fully qualified identifiers. (Probably very rarely). The possibility of missing a real match is a real problem.

regards - Chris
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20210113214044.GA24530%40rainslide.net.

No comments:

Post a Comment