Notepad++ Style comments with /**

I have a “.sql” file with 2 block comments:

/*
Comment
*/

/**
Comment
*/

capture

In the First block the colour style is the colour of the comments define. But in the second block… No. The colour style is the base… no the colour of comments style.

Why? It is possible to modify it?

Upvotes: 2

Views: 2172

Answers (2)

what about the following.

Use force at beginning of line For comment line style use * as open For comment style use the normal /* for open and */ for close Now the trick Use a delimiter and assign the same color as for comment for open put in \\ \ and for close ((EOL)) ((EOL))

Looks like this does it. (note I used different colors for demonstration)

Photp

Upvotes: 1

Radim Bača
Radim Bača

Reputation: 10701

You need to update your stylers.xml file. You should find it in your C:\Users\XXX\AppData\Roaming\Notepad++ directory. You find the following part:

    <LexerType name="sql" desc="SQL" ext="">
        ...
        <WordsStyle name="COMMENT" styleID="1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
        <WordsStyle name="COMMENT LINE" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
    </LexerType>

and updated it to

    <LexerType name="sql" desc="SQL" ext="">
        ...
        <WordsStyle name="COMMENT" styleID="1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
        <WordsStyle name="COMMENT LINE" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
        <WordsStyle name="COMMENT DOC" styleID="3" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
    </LexerType>

now it should color it as you want it.

Upvotes: 2

Related Questions