|
|
Descriptionmisc/notepadplus: fix some number syntax highlight issue
notepadplus can only support some normal golang's hex and imaginary numbers.
it can't detect some special number, eg. 1./1.e/1.i/1+0.1i (omit "0" in ".0").
Patch Set 1 #Patch Set 2 : diff -r ba1ddf085ffe http://code.google.com/p/go/ #Patch Set 3 : diff -r ba1ddf085ffe http://code.google.com/p/go/ #Patch Set 4 : diff -r ba1ddf085ffe http://code.google.com/p/go/ #MessagesTotal messages: 13
Hello golang-dev@googlegroups.com (cc: ajstarks@gmail.com), I'd like you to review this change to http://code.google.com/p/go/
Sign in to reply to this message.
Hello golang-dev@googlegroups.com (cc: ajstarks@gmail.com, golang-dev@googlegroups.com), Please take another look.
Sign in to reply to this message.
Two remarks: 1. The color of number is to close to that of keywords. The "C" version is brighter. But IMO both are not very well readable. The color blue that is used for strings could also be used for numbers and than it's better visible. And why seperate the colors of numbers and characters / strings? 2. keywords true and false are values. They should have the same color as numbers Below is my version of userDefineLang.xml Gerard <!-- <NotepadPlus> --> <UserLang name="go" ext="go" udlVersion="2.1"> <Settings> <Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" /> <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" /> </Settings> <KeywordLists> <Keywords name="Comments">00// 01 02 03/* 04*/</Keywords> <Keywords name="Numbers, prefix1">0x 0X</Keywords> <Keywords name="Numbers, prefix2"></Keywords> <Keywords name="Numbers, extras1">a b c d e f A B C D E F</Keywords> <Keywords name="Numbers, extras2"></Keywords> <Keywords name="Numbers, suffix1">i</Keywords> <Keywords name="Numbers, suffix2"></Keywords> <Keywords name="Numbers, range"></Keywords> <Keywords name="Operators1">( ) [ ] { } ... , ; & ^ % > < ! = + - * / | :</Keywords> <Keywords name="Operators2"></Keywords> <Keywords name="Folders in code1, open"></Keywords> <Keywords name="Folders in code1, middle"></Keywords> <Keywords name="Folders in code1, close"></Keywords> <Keywords name="Folders in code2, open"></Keywords> <Keywords name="Folders in code2, middle"></Keywords> <Keywords name="Folders in code2, close"></Keywords> <Keywords name="Folders in comment, open"></Keywords> <Keywords name="Folders in comment, middle"></Keywords> <Keywords name="Folders in comment, close"></Keywords> <Keywords name="Keywords1">break default func interface select case defer go map struct chan else goto package switch const fallthrough if range type continue for import return var</Keywords> <Keywords name="Keywords2">bool byte complex64 complex128 error float32 float64 int int8 int16 int32 int64 rune string uint uint8 uint16 uint32 uint64 uintptr iota nil</Keywords> <Keywords name="Keywords3">append cap close complex copy delete imag len make new panic print println real recover _</Keywords> <Keywords name="Keywords4">true false</Keywords> <Keywords name="Keywords5"></Keywords> <Keywords name="Keywords6"></Keywords> <Keywords name="Keywords7"></Keywords> <Keywords name="Keywords8"></Keywords> <Keywords name="Delimiters">00" 01\ 02" 03' 04\ 05' 06` 07 08` 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords> </KeywordLists> <Styles> <WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="COMMENTS" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="LINE COMMENTS" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="NUMBERS" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS1" fgColor="AA0000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /> <WordsStyle name="KEYWORDS2" fgColor="AA0000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /> <WordsStyle name="KEYWORDS3" fgColor="AA0000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS4" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="OPERATORS" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /> <WordsStyle name="FOLDER IN CODE1" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /> <WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS1" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS2" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS3" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> </Styles> </UserLang> <!-- </NotepadPlus> --> On Sunday, September 8, 2013 2:50:53 PM UTC+2, chai2010 wrote: > > Reviewers: golang-dev1, > > Message: > Hello golan...@googlegroups.com <javascript:> (cc: ajst...@gmail.com<javascript:>), > > > I'd like you to review this change to > http://code.google.com/p/go/ > > > Description: > misc/notepadplus: fix some number syntax highlight issue > > notepadplus can only support some normal golang's hex and imaginary > numbers. > it can't detect some special number, eg. 1./1.e/1.i/1+0.1i (omit "0" in > ".0"). > > Please review this at https://codereview.appspot.com/13401047/ > > Affected files (+3, -3 lines): > M misc/notepadplus/userDefineLang.xml > > > Index: misc/notepadplus/userDefineLang.xml > =================================================================== > --- a/misc/notepadplus/userDefineLang.xml > +++ b/misc/notepadplus/userDefineLang.xml > @@ -7,11 +7,11 @@ > <KeywordLists> > <Keywords name="Comments">00// 01 02 03/* 04*/</Keywords> > <Keywords name="Numbers, prefix1"></Keywords> > - <Keywords name="Numbers, prefix2"></Keywords> > - <Keywords name="Numbers, extras1"></Keywords> > + <Keywords name="Numbers, prefix2">0x 0X</Keywords> > + <Keywords name="Numbers, extras1">a b c d e f A B C D E > F</Keywords> > <Keywords name="Numbers, extras2"></Keywords> > <Keywords name="Numbers, suffix1"></Keywords> > - <Keywords name="Numbers, suffix2"></Keywords> > + <Keywords name="Numbers, suffix2">i</Keywords> > <Keywords name="Numbers, range"></Keywords> > <Keywords name="Operators1">( ) [ ] { } ... , ; & ^ % > > > < ! = + - * / | :</Keywords> > <Keywords name="Operators2"></Keywords> > > >
Sign in to reply to this message.
LGTM On Sep 8, 2013, at 8:50 AM, chaishushan@gmail.com wrote: > Reviewers: golang-dev1, > > Message: > Hello golang-dev@googlegroups.com (cc: ajstarks@gmail.com), > > I'd like you to review this change to > http://code.google.com/p/go/ > > > Description: > misc/notepadplus: fix some number syntax highlight issue > > notepadplus can only support some normal golang's hex and imaginary > numbers. > it can't detect some special number, eg. 1./1.e/1.i/1+0.1i (omit "0" in > ".0"). > > Please review this at https://codereview.appspot.com/13401047/ > > Affected files (+3, -3 lines): > M misc/notepadplus/userDefineLang.xml > > > Index: misc/notepadplus/userDefineLang.xml > =================================================================== > --- a/misc/notepadplus/userDefineLang.xml > +++ b/misc/notepadplus/userDefineLang.xml > @@ -7,11 +7,11 @@ > <KeywordLists> > <Keywords name="Comments">00// 01 02 03/* 04*/</Keywords> > <Keywords name="Numbers, prefix1"></Keywords> > - <Keywords name="Numbers, prefix2"></Keywords> > - <Keywords name="Numbers, extras1"></Keywords> > + <Keywords name="Numbers, prefix2">0x 0X</Keywords> > + <Keywords name="Numbers, extras1">a b c d e f A B C D E F</Keywords> > <Keywords name="Numbers, extras2"></Keywords> > <Keywords name="Numbers, suffix1"></Keywords> > - <Keywords name="Numbers, suffix2"></Keywords> > + <Keywords name="Numbers, suffix2">i</Keywords> > <Keywords name="Numbers, range"></Keywords> > <Keywords name="Operators1">( ) [ ] { } ... , ; & ^ % > < ! = + - * / | :</Keywords> > <Keywords name="Operators2"></Keywords> > >
Sign in to reply to this message.
I propose changing the comment color to 778899 in a separate CL. On Sep 8, 2013, at 10:48 AM, gvdschoot@gmail.com wrote: > Two remarks: > • The color of number is to close to that of keywords. The "C" version is brighter. But IMO both are not very well readable. The color blue that is used for strings could also be used for numbers and than it's better visible. And why seperate the colors of numbers and characters / strings? > • keywords true and false are values. They should have the same color as numbers > Below is my version of userDefineLang.xml > > Gerard > > <!-- <NotepadPlus> --> > <UserLang name="go" ext="go" udlVersion="2.1"> > <Settings> > <Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" /> > <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" /> > </Settings> > <KeywordLists> > <Keywords name="Comments">00// 01 02 03/* 04*/</Keywords> > <Keywords name="Numbers, prefix1">0x 0X</Keywords> > <Keywords name="Numbers, prefix2"></Keywords> > <Keywords name="Numbers, extras1">a b c d e f A B C D E F</Keywords> > <Keywords name="Numbers, extras2"></Keywords> > <Keywords name="Numbers, suffix1">i</Keywords> > <Keywords name="Numbers, suffix2"></Keywords> > <Keywords name="Numbers, range"></Keywords> > <Keywords name="Operators1">( ) [ ] { } ... , ; & ^ % > < ! = + - * / | :</Keywords> > <Keywords name="Operators2"></Keywords> > <Keywords name="Folders in code1, open"></Keywords> > <Keywords name="Folders in code1, middle"></Keywords> > <Keywords name="Folders in code1, close"></Keywords> > <Keywords name="Folders in code2, open"></Keywords> > <Keywords name="Folders in code2, middle"></Keywords> > <Keywords name="Folders in code2, close"></Keywords> > <Keywords name="Folders in comment, open"></Keywords> > <Keywords name="Folders in comment, middle"></Keywords> > <Keywords name="Folders in comment, close"></Keywords> > <Keywords name="Keywords1">break default func interface select case defer go map struct chan else goto package switch const fallthrough if range type continue for import return var</Keywords> > <Keywords name="Keywords2">bool byte complex64 complex128 error float32 float64 int int8 int16 int32 int64 rune string uint uint8 uint16 uint32 uint64 uintptr iota nil</Keywords> > <Keywords name="Keywords3">append cap close complex copy delete imag len make new panic print println real recover _</Keywords> > <Keywords name="Keywords4">true false</Keywords> > <Keywords name="Keywords5"></Keywords> > <Keywords name="Keywords6"></Keywords> > <Keywords name="Keywords7"></Keywords> > <Keywords name="Keywords8"></Keywords> > <Keywords name="Delimiters">00" 01\ 02" 03' 04\ 05' 06` 07 08` 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords> > </KeywordLists> > <Styles> > <WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="COMMENTS" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="LINE COMMENTS" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="NUMBERS" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="KEYWORDS1" fgColor="AA0000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /> > <WordsStyle name="KEYWORDS2" fgColor="AA0000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /> > <WordsStyle name="KEYWORDS3" fgColor="AA0000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="KEYWORDS4" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="OPERATORS" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /> > <WordsStyle name="FOLDER IN CODE1" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /> > <WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="DELIMITERS1" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="DELIMITERS2" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="DELIMITERS3" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > <WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > </Styles> > </UserLang> > <!-- </NotepadPlus> --> > > > On Sunday, September 8, 2013 2:50:53 PM UTC+2, chai2010 wrote: > Reviewers: golang-dev1, > > Message: > Hello golan...@googlegroups.com (cc: ajst...@gmail.com), > > I'd like you to review this change to > http://code.google.com/p/go/ > > > Description: > misc/notepadplus: fix some number syntax highlight issue > > notepadplus can only support some normal golang's hex and imaginary > numbers. > it can't detect some special number, eg. 1./1.e/1.i/1+0.1i (omit "0" in > ".0"). > > Please review this at https://codereview.appspot.com/13401047/ > > Affected files (+3, -3 lines): > M misc/notepadplus/userDefineLang.xml > > > Index: misc/notepadplus/userDefineLang.xml > =================================================================== > --- a/misc/notepadplus/userDefineLang.xml > +++ b/misc/notepadplus/userDefineLang.xml > @@ -7,11 +7,11 @@ > <KeywordLists> > <Keywords name="Comments">00// 01 02 03/* 04*/</Keywords> > <Keywords name="Numbers, prefix1"></Keywords> > - <Keywords name="Numbers, prefix2"></Keywords> > - <Keywords name="Numbers, extras1"></Keywords> > + <Keywords name="Numbers, prefix2">0x 0X</Keywords> > + <Keywords name="Numbers, extras1">a b c d e f A B C D E > F</Keywords> > <Keywords name="Numbers, extras2"></Keywords> > <Keywords name="Numbers, suffix1"></Keywords> > - <Keywords name="Numbers, suffix2"></Keywords> > + <Keywords name="Numbers, suffix2">i</Keywords> > <Keywords name="Numbers, range"></Keywords> > <Keywords name="Operators1">( ) [ ] { } ... , ; & ^ % > > < ! = + - * / | :</Keywords> > <Keywords name="Operators2"></Keywords> > >
Sign in to reply to this message.
I think the npp's standard comments color is better, and it is also used in c/python/lua/javascript/... On 2013/09/10 02:10:36, ajstarks wrote: > I propose changing the comment color to 778899 in a separate CL. > > > On Sep 8, 2013, at 10:48 AM, mailto:gvdschoot@gmail.com wrote: > > > Two remarks: > > • The color of number is to close to that of keywords. The "C" version is > brighter. But IMO both are not very well readable. The color blue that is used > for strings could also be used for numbers and than it's better visible. And why > seperate the colors of numbers and characters / strings? > > • keywords true and false are values. They should have the same color as > numbers > > Below is my version of userDefineLang.xml > > > > Gerard > > > > <!-- <NotepadPlus> --> > > <UserLang name="go" ext="go" udlVersion="2.1"> > > <Settings> > > <Global caseIgnored="no" allowFoldOfComments="yes" > foldCompact="no" forcePureLC="0" decimalSeparator="0" /> > > <Prefix Keywords1="no" Keywords2="no" Keywords3="no" > Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" /> > > </Settings> > > <KeywordLists> > > <Keywords name="Comments">00// 01 02 03/* 04*/</Keywords> > > <Keywords name="Numbers, prefix1">0x 0X</Keywords> > > <Keywords name="Numbers, prefix2"></Keywords> > > <Keywords name="Numbers, extras1">a b c d e f A B C D E > F</Keywords> > > <Keywords name="Numbers, extras2"></Keywords> > > <Keywords name="Numbers, suffix1">i</Keywords> > > <Keywords name="Numbers, suffix2"></Keywords> > > <Keywords name="Numbers, range"></Keywords> > > <Keywords name="Operators1">( ) [ ] { } ... , ; & ^ % > > < ! = + - * / | :</Keywords> > > <Keywords name="Operators2"></Keywords> > > <Keywords name="Folders in code1, open"></Keywords> > > <Keywords name="Folders in code1, middle"></Keywords> > > <Keywords name="Folders in code1, close"></Keywords> > > <Keywords name="Folders in code2, open"></Keywords> > > <Keywords name="Folders in code2, middle"></Keywords> > > <Keywords name="Folders in code2, close"></Keywords> > > <Keywords name="Folders in comment, open"></Keywords> > > <Keywords name="Folders in comment, middle"></Keywords> > > <Keywords name="Folders in comment, close"></Keywords> > > <Keywords name="Keywords1">break default func interface select > case defer go map struct chan else goto package switch const fallthrough if > range type continue for import return var</Keywords> > > <Keywords name="Keywords2">bool byte complex64 complex128 error > float32 float64 int int8 int16 int32 int64 rune string uint uint8 uint16 uint32 > uint64 uintptr iota nil</Keywords> > > <Keywords name="Keywords3">append cap close complex copy delete > imag len make new panic print println real recover _</Keywords> > > <Keywords name="Keywords4">true false</Keywords> > > <Keywords name="Keywords5"></Keywords> > > <Keywords name="Keywords6"></Keywords> > > <Keywords name="Keywords7"></Keywords> > > <Keywords name="Keywords8"></Keywords> > > <Keywords name="Delimiters">00" 01\ 02" 03' 04\ > 05' 06` 07 08` 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords> > > </KeywordLists> > > <Styles> > > <WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" > fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="COMMENTS" fgColor="008000" bgColor="FFFFFF" > fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="LINE COMMENTS" fgColor="008000" bgColor="FFFFFF" > fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="NUMBERS" fgColor="0000FF" bgColor="FFFFFF" > fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="KEYWORDS1" fgColor="AA0000" bgColor="FFFFFF" > fontName="" fontStyle="1" nesting="0" /> > > <WordsStyle name="KEYWORDS2" fgColor="AA0000" bgColor="FFFFFF" > fontName="" fontStyle="1" nesting="0" /> > > <WordsStyle name="KEYWORDS3" fgColor="AA0000" bgColor="FFFFFF" > fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="KEYWORDS4" fgColor="0000FF" bgColor="FFFFFF" > fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" > fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" > fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" > fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" > fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="OPERATORS" fgColor="8000FF" bgColor="FFFFFF" > fontName="" fontStyle="1" nesting="0" /> > > <WordsStyle name="FOLDER IN CODE1" fgColor="8000FF" > bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /> > > <WordsStyle name="FOLDER IN CODE2" fgColor="000000" > bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="FOLDER IN COMMENT" fgColor="000000" > bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="DELIMITERS1" fgColor="0000FF" bgColor="FFFFFF" > fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="DELIMITERS2" fgColor="0000FF" bgColor="FFFFFF" > fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="DELIMITERS3" fgColor="0000FF" bgColor="FFFFFF" > fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" > fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" > fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" > fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" > fontName="" fontStyle="0" nesting="0" /> > > <WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" > fontName="" fontStyle="0" nesting="0" /> > > </Styles> > > </UserLang> > > <!-- </NotepadPlus> --> > > > > > > On Sunday, September 8, 2013 2:50:53 PM UTC+2, chai2010 wrote: > > Reviewers: golang-dev1, > > > > Message: > > Hello mailto:golan...@googlegroups.com (cc: mailto:ajst...@gmail.com), > > > > I'd like you to review this change to > > http://code.google.com/p/go/ > > > > > > Description: > > misc/notepadplus: fix some number syntax highlight issue > > > > notepadplus can only support some normal golang's hex and imaginary > > numbers. > > it can't detect some special number, eg. 1./1.e/1.i/1+0.1i (omit "0" in > > ".0"). > > > > Please review this at https://codereview.appspot.com/13401047/ > > > > Affected files (+3, -3 lines): > > M misc/notepadplus/userDefineLang.xml > > > > > > Index: misc/notepadplus/userDefineLang.xml > > =================================================================== > > --- a/misc/notepadplus/userDefineLang.xml > > +++ b/misc/notepadplus/userDefineLang.xml > > @@ -7,11 +7,11 @@ > > <KeywordLists> > > <Keywords name="Comments">00// 01 02 03/* 04*/</Keywords> > > <Keywords name="Numbers, prefix1"></Keywords> > > - <Keywords name="Numbers, prefix2"></Keywords> > > - <Keywords name="Numbers, extras1"></Keywords> > > + <Keywords name="Numbers, prefix2">0x 0X</Keywords> > > + <Keywords name="Numbers, extras1">a b c d e f A B C D E > > F</Keywords> > > <Keywords name="Numbers, extras2"></Keywords> > > <Keywords name="Numbers, suffix1"></Keywords> > > - <Keywords name="Numbers, suffix2"></Keywords> > > + <Keywords name="Numbers, suffix2">i</Keywords> > > <Keywords name="Numbers, range"></Keywords> > > <Keywords name="Operators1">( ) [ ] { } ... , ; & ^ % > > > > < ! = + - * / | :</Keywords> > > <Keywords name="Operators2"></Keywords> > > > > >
Sign in to reply to this message.
This go file (link <http://play.golang.org/p/iEeuVmCXGk>) shows AFAIK most / all variable assignments and can help with npp formatting / styling of the vars. On Tuesday, September 10, 2013 8:03:53 AM UTC+2, chai2010 wrote: > > I think the npp's standard comments color is better, > and it is also used in c/python/lua/javascript/... > > On 2013/09/10 02:10:36, ajstarks wrote: > > I propose changing the comment color to 778899 in a separate CL. > > > > On Sep 8, 2013, at 10:48 AM, mailto:gvds...@gmail.com <javascript:>wrote: > > > > Two remarks: > > > • The color of number is to close to that of keywords. The "C" > version is > > brighter. But IMO both are not very well readable. The color blue that > is used > > for strings could also be used for numbers and than it's better > visible. And why > > seperate the colors of numbers and characters / strings? > > > • keywords true and false are values. They should have the > same > color as > > numbers > > > Below is my version of userDefineLang.xml > > > > > > Gerard > > > > > > <!-- <NotepadPlus> --> > > > <UserLang name="go" ext="go" udlVersion="2.1"> > > > <Settings> > > > <Global caseIgnored="no" allowFoldOfComments="yes" > > foldCompact="no" forcePureLC="0" decimalSeparator="0" /> > > > <Prefix Keywords1="no" Keywords2="no" Keywords3="no" > > Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" > Keywords8="no" /> > > > </Settings> > > > <KeywordLists> > > > <Keywords name="Comments">00// 01 02 03/* > 04*/</Keywords> > > > <Keywords name="Numbers, prefix1">0x 0X</Keywords> > > > <Keywords name="Numbers, prefix2"></Keywords> > > > <Keywords name="Numbers, extras1">a b c d e f A B C D E > > F</Keywords> > > > <Keywords name="Numbers, extras2"></Keywords> > > > <Keywords name="Numbers, suffix1">i</Keywords> > > > <Keywords name="Numbers, suffix2"></Keywords> > > > <Keywords name="Numbers, range"></Keywords> > > > <Keywords name="Operators1">( ) [ ] { } ... , ; & ^ > % > > > < ! = + - * / | :</Keywords> > > > <Keywords name="Operators2"></Keywords> > > > <Keywords name="Folders in code1, open"></Keywords> > > > <Keywords name="Folders in code1, middle"></Keywords> > > > <Keywords name="Folders in code1, close"></Keywords> > > > <Keywords name="Folders in code2, open"></Keywords> > > > <Keywords name="Folders in code2, middle"></Keywords> > > > <Keywords name="Folders in code2, close"></Keywords> > > > <Keywords name="Folders in comment, open"></Keywords> > > > <Keywords name="Folders in comment, middle"></Keywords> > > > <Keywords name="Folders in comment, close"></Keywords> > > > <Keywords name="Keywords1">break default func interface > select > > case defer go map struct chan else goto package switch const > fallthrough if > > range type continue for import return var</Keywords> > > > <Keywords name="Keywords2">bool byte complex64 > complex128 error > > float32 float64 int int8 int16 int32 int64 rune string uint uint8 > uint16 uint32 > > uint64 uintptr iota nil</Keywords> > > > <Keywords name="Keywords3">append cap close complex copy > delete > > imag len make new panic print println real recover _</Keywords> > > > <Keywords name="Keywords4">true false</Keywords> > > > <Keywords name="Keywords5"></Keywords> > > > <Keywords name="Keywords6"></Keywords> > > > <Keywords name="Keywords7"></Keywords> > > > <Keywords name="Keywords8"></Keywords> > > > <Keywords name="Delimiters">00" 01\ 02" > 03' 04\ > > 05' 06` 07 08` 09 10 11 12 13 14 15 16 17 18 19 20 21 22 > 23</Keywords> > > > </KeywordLists> > > > <Styles> > > > <WordsStyle name="DEFAULT" fgColor="000000" > bgColor="FFFFFF" > > fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="COMMENTS" fgColor="008000" > bgColor="FFFFFF" > > fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="LINE COMMENTS" fgColor="008000" > bgColor="FFFFFF" > > fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="NUMBERS" fgColor="0000FF" > bgColor="FFFFFF" > > fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="KEYWORDS1" fgColor="AA0000" > bgColor="FFFFFF" > > fontName="" fontStyle="1" nesting="0" /> > > > <WordsStyle name="KEYWORDS2" fgColor="AA0000" > bgColor="FFFFFF" > > fontName="" fontStyle="1" nesting="0" /> > > > <WordsStyle name="KEYWORDS3" fgColor="AA0000" > bgColor="FFFFFF" > > fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="KEYWORDS4" fgColor="0000FF" > bgColor="FFFFFF" > > fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="KEYWORDS5" fgColor="000000" > bgColor="FFFFFF" > > fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="KEYWORDS6" fgColor="000000" > bgColor="FFFFFF" > > fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="KEYWORDS7" fgColor="000000" > bgColor="FFFFFF" > > fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="KEYWORDS8" fgColor="000000" > bgColor="FFFFFF" > > fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="OPERATORS" fgColor="8000FF" > bgColor="FFFFFF" > > fontName="" fontStyle="1" nesting="0" /> > > > <WordsStyle name="FOLDER IN CODE1" fgColor="8000FF" > > bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" /> > > > <WordsStyle name="FOLDER IN CODE2" fgColor="000000" > > bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="FOLDER IN COMMENT" fgColor="000000" > > bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="DELIMITERS1" fgColor="0000FF" > bgColor="FFFFFF" > > fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="DELIMITERS2" fgColor="0000FF" > bgColor="FFFFFF" > > fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="DELIMITERS3" fgColor="0000FF" > bgColor="FFFFFF" > > fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="DELIMITERS4" fgColor="000000" > bgColor="FFFFFF" > > fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="DELIMITERS5" fgColor="000000" > bgColor="FFFFFF" > > fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="DELIMITERS6" fgColor="000000" > bgColor="FFFFFF" > > fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="DELIMITERS7" fgColor="000000" > bgColor="FFFFFF" > > fontName="" fontStyle="0" nesting="0" /> > > > <WordsStyle name="DELIMITERS8" fgColor="000000" > bgColor="FFFFFF" > > fontName="" fontStyle="0" nesting="0" /> > > > </Styles> > > > </UserLang> > > > <!-- </NotepadPlus> --> > > > > > > > > > On Sunday, September 8, 2013 2:50:53 PM UTC+2, chai2010 wrote: > > > Reviewers: golang-dev1, > > > > > > Message: > > > Hello mailto:golan...@googlegroups.com (cc: > mailto:ajst...@gmail.com), > > > > > > I'd like you to review this change to > > > http://code.google.com/p/go/ > > > > > > > > > Description: > > > misc/notepadplus: fix some number syntax highlight issue > > > > > > notepadplus can only support some normal golang's hex and imaginary > > > numbers. > > > it can't detect some special number, eg. 1./1.e/1.i/1+0.1i (omit "0" > in > > > ".0"). > > > > > > Please review this at https://codereview.appspot.com/13401047/ > > > > > > Affected files (+3, -3 lines): > > > M misc/notepadplus/userDefineLang.xml > > > > > > > > > Index: misc/notepadplus/userDefineLang.xml > > > =================================================================== > > > --- a/misc/notepadplus/userDefineLang.xml > > > +++ b/misc/notepadplus/userDefineLang.xml > > > @@ -7,11 +7,11 @@ > > > <KeywordLists> > > > <Keywords name="Comments">00// 01 02 03/* > 04*/</Keywords> > > > <Keywords name="Numbers, prefix1"></Keywords> > > > - <Keywords name="Numbers, prefix2"></Keywords> > > > - <Keywords name="Numbers, extras1"></Keywords> > > > + <Keywords name="Numbers, prefix2">0x 0X</Keywords> > > > + <Keywords name="Numbers, extras1">a b c d e f A B C D E > > > > F</Keywords> > > > <Keywords name="Numbers, extras2"></Keywords> > > > <Keywords name="Numbers, suffix1"></Keywords> > > > - <Keywords name="Numbers, suffix2"></Keywords> > > > + <Keywords name="Numbers, suffix2">i</Keywords> > > > <Keywords name="Numbers, range"></Keywords> > > > <Keywords name="Operators1">( ) [ ] { } ... , ; & > ^ % > > > > > < ! = + - * / | :</Keywords> > > > <Keywords name="Operators2"></Keywords> > > > > > > > > > > https://codereview.appspot.com/13401047/ >
Sign in to reply to this message.
Please change the following to display the boolean values true and false as a value of a keyword: line 28: <Keywords name="Keywords2">bool byte complex64 complex128 error floa t32 float64 int int8 int16 int32 int64 rune string uint uint8 uint16 uint32 uint 64 uintptr iota nil</Keywords> line 30: <Keywords name="Keywords4">true false</Keywords> line 45: <WordsStyle name="KEYWORDS4" fgColor="A52A2A" bgColor="FFFFFF" fontN ame="" fontStyle="0" nesting="0" /> The color changes in a separate CL. I prefer blue for all values (numbers, boolean, runes and strings). LGTM
Sign in to reply to this message.
On 2013/09/11 09:18:28, gvdschoot wrote: > The color changes in a separate CL. I prefer blue for all values (numbers, > boolean, runes and strings). > With blue I mean: fgColor="0000FF"
Sign in to reply to this message.
On 2013/09/11 09:24:24, gvdschoot wrote: > On 2013/09/11 09:18:28, gvdschoot wrote: > > The color changes in a separate CL. I prefer blue for all values (numbers, > > boolean, runes and strings). > > > With blue I mean: fgColor="0000FF" You can discuss the new topic in golang-nuts. This CL just for number syntax highlight issue.
Sign in to reply to this message.
bradfitz: ping?
Sign in to reply to this message.
On 2013/09/13 03:05:32, chai2010 wrote: > bradfitz: ping? ping
Sign in to reply to this message.
*** Submitted as https://code.google.com/p/go/source/detail?r=4ed494a20969 *** misc/notepadplus: fix some number syntax highlight issue notepadplus can only support some normal golang's hex and imaginary numbers. it can't detect some special number, eg. 1./1.e/1.i/1+0.1i (omit "0" in ".0"). R=golang-dev, gvdschoot CC=ajstarks, golang-dev https://codereview.appspot.com/13401047 Committer: Andrew Gerrand <adg@golang.org>
Sign in to reply to this message.
|