Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
match 只对最后一个有效?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
tm 闲耘  
View profile   Translate to Translated (View Original)
 More options Nov 4, 9:41 am
From: 闲耘(tm) <hotoo...@gmail.com>
Date: Wed, 4 Nov 2009 22:41:37 +0800
Local: Wed, Nov 4 2009 9:41 am
Subject: match 只对最后一个有效?

hi URI_string gui=underline
match URI_string
/\(http\|https\|ftp\|ftps\):\/\/\w\+\(\.\w\+\)\+\(\w\|\~\|\!\|@\|\#\|\$\|%\ |&\|\^\|\*\|(\|)\|\-\|_\|+\|=\||\|\\\|\[\|\]\|{\|}\|;\|:\|,\|\.\|\/\|?\)*/
hi Email_string gui=underline
match Email_string /[a-zA-Z]\w*\(\.\w\+\)*@\w\+\(\.\w\+\)\+/

我定义了两个模式,一个让url带下划线,另一个让email带下划线,但是请问为什么只有最后一个生效的?

--
闲耘(tm) (@hotoo, xianyun.org)
Sent from Hangzhou, 33, China


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ricky  
View profile   Translate to Translated (View Original)
 More options Nov 4, 10:02 am
From: "Ricky" <richi...@live.com>
Date: Wed, 4 Nov 2009 23:02:56 +0800
Local: Wed, Nov 4 2009 10:02 am
Subject: Re: [Vim-cn:3105] match 只对最后一个有效?

syn match URI_string /\(http\|https\|ftp\|ftps\):\/\/\w\+\(\.\w\+\)\+\(\w\|\~\|\!\|@\|\#\|\$\|%\ |&\|\^\|\*\|(\|)\|\-\|_\|+\|=\||\|\\\|\[\|\]\|{\|}\|;\|:\|,\|\.\|\/\|?\)*/
syn match Email_string /[a-zA-Z]\w*\(\.\w\+\)*@\w\+\(\.\w\+\)\+/

我测试两个加上syn后都能同时显示下划线,没加的时候就只有最新生效的才能显示出来
email地址的正则该加上-
vim-cn@googlegroups.com 就只能从cn开始显示下划线,如果需要的话
---------------
hi URI_string gui=underline
match URI_string /\(http\|https\|ftp\|ftps\):\/\/\w\+\(\.\w\+\)\+\(\w\|\~\|\!\|@\|\#\|\$\|%\ |&\|\^\|\*\|(\|)\|\-\|_\|+\|=\||\|\\\|\[\|\]\|{\|}\|;\|:\|,\|\.\|\/\|?\)*/
hi Email_string gui=underline
match Email_string /[a-zA-Z]\w*\(\.\w\+\)*@\w\+\(\.\w\+\)\+/

我定义了两个模式,一个让url带下划线,另一个让email带下划线,但是请问为什么只有最后一个生效的?

--
闲耘™ (@hotoo, xianyun.org)
Sent from Hangzhou, 33, China


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
tm 闲耘  
View profile   Translate to Translated (View Original)
 More options Nov 4, 10:58 am
From: 闲耘(tm) <hotoo...@gmail.com>
Date: Wed, 4 Nov 2009 23:58:45 +0800
Local: Wed, Nov 4 2009 10:58 am
Subject: Re: [Vim-cn:3107] Re: match 只对最后一个有效?

谢谢,这是新的Email验证,但是范围不够宽泛,会有一下domain不能通过验证

syn match Email_string
/[a-zA-Z]\+\(\-\?\w\+\)*\(\.\w\+\(\-\?\w\+\)*\)*@\w\+\(\.\w\+\)\+/

--
闲耘(tm) (@hotoo, xianyun.org)
Sent from Hangzhou, 33, China

2009/11/4 Ricky <richi...@live.com>


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
tm 闲耘  
View profile   Translate to Translated (View Original)
 More options Nov 4, 8:46 pm
From: 闲耘(tm) <hotoo...@gmail.com>
Date: Thu, 5 Nov 2009 09:46:15 +0800
Local: Wed, Nov 4 2009 8:46 pm
Subject: Re: [Vim-cn:3107] Re: match 只对最后一个有效?

仍有一个问题,优先级不够,几乎除了文本文件有效,
对于例如html, js....之类有自己syntax的类型文件,则无效。

--
闲耘(tm) (@hotoo, xianyun.org)
Sent from Hangzhou, 33, China

2009/11/4 闲耘 <hotoo...@gmail.com>


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google