fault in * in perl files (.pl)

7 views
Skip to first unread message

c.wil...@btinternet.com

unread,
Jan 12, 2021, 10:24:59 AM1/12/21
to vim...@googlegroups.com

Hi


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?


regards - Chris

Paul

unread,
Jan 13, 2021, 4:40:53 PM1/13/21
to vim...@googlegroups.com
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.
signature.asc

c.wil...@btinternet.com

unread,
Jan 13, 2021, 5:31:07 PM1/13/21
to vim...@googlegroups.com
------ Original Message ------
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+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20210113214044.GA24530%40rainslide.net.
Reply all
Reply to author
Forward
0 new messages