How to know if a line is commented in C

0 views
Skip to first unread message

epanda

unread,
Nov 23, 2009, 11:29:14 AM11/23/09
to vim_use
Hi,


I would like to know if a found line of my search is in a comment
block .


/*

Func()

*/



/*

// Func()

*/

pansz

unread,
Nov 23, 2009, 7:51:15 PM11/23/09
to vim...@googlegroups.com
epanda 写道:

> Hi,
> I would like to know if a found line of my search is in a comment
> block .
> /*
>
> Func()
>
> */

:echo synIDattr(synID(line("."), col("."), 1), "name")

this gives you the highlight group of the current line/column, you can
see it is comment.

epanda

unread,
Nov 24, 2009, 3:03:06 AM11/24/09
to vim_use
Thanks it returns cCommentL when I am into a comment and returns
nothing when I am into code lines.
Very Powerful

Thanks :)

Raúl Núñez de Arenas Coronado

unread,
Nov 24, 2009, 3:22:56 AM11/24/09
to vim...@googlegroups.com
Hi epanda,

On Tue, Nov 24, 2009 at 09:03, epanda <callin...@hotmail.fr> wrote:
> Thanks it returns cCommentL when I am into a comment and returns
> nothing when I am into code lines.
> Very Powerful

You've already been warned about topposting.
How many time are you keep on ignoring list guidelines?

Just curiosity, because since the guidelines are by no means enforced,
this is the mailing list of do-as-you-please. So, if you feel like
having to use the list guidelines as toilet paper, by all means keep
on doing it!

--
Raúl "DervishD" Núñez de Arenas Coronado
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

epanda

unread,
Nov 24, 2009, 3:44:13 AM11/24/09
to vim_use
It is certainly due to my poor knowledge in english. I am french

On 24 nov, 09:22, Raúl Núñez de Arenas Coronado <raul...@gmail.com>
wrote:
> Hi epanda,

bill lam

unread,
Nov 24, 2009, 3:54:43 AM11/24/09
to vim...@googlegroups.com
On Tue, 24 Nov 2009, epanda wrote:
>
> It is certainly due to my poor knowledge in english. I am french
>
> On 24 nov, 09:22, Raúl Núñez de Arenas Coronado <raul...@gmail.com>
> wrote:
> [---=| TOFU protection by t-prot: 19 lines snipped |=---]

You might try google translation to re-read that mailing list guideline.

--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

Raúl Núñez de Arenas Coronado

unread,
Nov 24, 2009, 3:56:16 AM11/24/09
to vim...@googlegroups.com
Hi,

On Tue, Nov 24, 2009 at 09:44, epanda <callin...@hotmail.fr> wrote:
> It is certainly due to my poor knowledge in english. I am french

I don't believe you didn't understand the warning. Have you even *tried*
to read list guidelines?

Anyway, don't toppost on this list. If you don't know what topposting
is:

http://fr.wikipedia.org/wiki/TOFU_(Usenet_et_Internet)

Read the list guidelines, and if you don't understand them, ask for
help. You can't ignore the guidelines just because you think you don't
understand them.

epanda

unread,
Nov 24, 2009, 4:01:17 AM11/24/09
to vim_use
I am not opposed to respect guidlines but I would like to know your
disappointment about my messages ?
What do I do that it is wrong please ?

On 24 nov, 09:56, Raúl Núñez de Arenas Coronado <raul...@gmail.com>
wrote:
> Hi,

Raúl Núñez de Arenas Coronado

unread,
Nov 24, 2009, 4:07:58 AM11/24/09
to vim...@googlegroups.com
Hi,

On Tue, Nov 24, 2009 at 10:01, epanda <callin...@hotmail.fr> wrote:
> I am not opposed to respect guidlines but I would like to know your
> disappointment about my messages ?
> What do I do that it is wrong please ?

Top posting. I've given you a link, in french, explaining the problem.

This is my last email about the issue. Do as you please.

Jan-Herbert Damm

unread,
Nov 24, 2009, 4:38:50 AM11/24/09
to vim...@googlegroups.com
hello,

Raúl Núñez de Arenas Coronado wrote on 24.11.09:


>
> Hi,
>
> On Tue, Nov 24, 2009 at 10:01, epanda <callin...@hotmail.fr> wrote:
> > I am not opposed to respect guidlines but I would like to know your
> > disappointment about my messages ?
> > What do I do that it is wrong please ?
>
> Top posting. I've given you a link, in french, explaining the problem.
>
> This is my last email about the issue. Do as you please.

please don't be so harsh about this issue. it has been stated in other threads
that it might be ok to top-post short notices, such as "thank you, this has
worked, but it could be improved". ependas posts have been mostly like that.


jan

ps. being utterly inconsequential is definitely bad, but being utterly
consequential is cruel. i'm saying this as a german, exaggeration meant as
exemplification.

Isaac

unread,
Nov 24, 2009, 5:22:59 AM11/24/09
to vim...@googlegroups.com

On Tue, Nov 24, 2009 at 5:38 PM, Jan-Herbert Damm <jan-h...@web.de> wrote:

ps. being utterly inconsequential is definitely bad, but being utterly
consequential is cruel. i'm saying this as a german, exaggeration meant as
exemplification.

Agree. Family needs rules to discipline child, it would fail sometimes...
but I believe  *Love Never Fails*  :)


--
Regards, Isaac. (李霆钧)
- http://delicious.com/litingjun
- http://litingjun.amplify.com

bill lam

unread,
Nov 24, 2009, 10:41:50 AM11/24/09
to vim...@googlegroups.com
On Tue, 24 Nov 2009, epanda wrote:
>
> I am not opposed to respect guidlines but I would like to know your
> disappointment about my messages ?
> What do I do that it is wrong please ?

In your reply you put your own message on top of the quoted message
like this: (top posting)


your reply ]] I am not opposed to respect guidlines but I would like to know your
your reply ]] disappointment about my messages ?
your reply ]] What do I do that it is wrong please ?
your reply ]]
quoted msg ]] On 24 nov, 09:56, Raúl Núñez de Arenas Coronado <raul...@gmail.com>
quoted msg ]] wrote:
quoted msg ]] > Hi,
quoted msg ]] >
quoted msg ]] > On Tue, Nov 24, 2009 at 09:44, epanda <callingel...@hotmail.fr> wrote:
quoted msg ]] > > It is certainly due to my poor knowledge in english. I am french
quoted msg ]] >
quoted msg ]] > I don't believe you didn't understand the warning. Have you even *tried*
quoted msg ]] > to read list guidelines?

BUT the guideline of this mailing list requested you to write like in
this way, (bottom post)

quoted msg ]] On 24 nov, 09:56, Raúl Núñez de Arenas Coronado <raul...@gmail.com>
quoted msg ]] wrote:
quoted msg ]] > Hi,
quoted msg ]] >
quoted msg ]] > On Tue, Nov 24, 2009 at 09:44, epanda <callingel...@hotmail.fr> wrote:
quoted msg ]] > > It is certainly due to my poor knowledge in english. I am french
quoted msg ]] >
quoted msg ]] > I don't believe you didn't understand the warning. Have you even *tried*
quoted msg ]] > to read list guidelines?
your reply ]]
your reply ]] I am not opposed to respect guidlines but I would like to know your
your reply ]] disappointment about my messages ?
your reply ]] What do I do that it is wrong please ?

Can you see the difference? There are other rules as stated in the
guideline, if you have problems in understanding any of those rules,
please bring it forward for discussion. Otherwise list moderators
will consider you just want to break those rules intentionally.

Reply all
Reply to author
Forward
0 new messages