Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Even more better Readme formatting.

  • Loading branch information...
commit 1e64aaeb5158425ca884eecd13cffa0adb98f821 1 parent 8a4c00c
Uli Kusterer authored

Showing 1 changed file with 36 additions and 11 deletions. Show diff stats Hide diff stats

  1. +36 11 README.markdown
47 README.markdown
Source Rendered
@@ -21,15 +21,32 @@ To adapt the syntax coloring to another language, change the SyntaxDefinition.pl
21 21 The first has the key "Components", which is an array of dictionaries each
22 22 describing one "thing" that can be colorized. Here's what the various keys mean:
23 23
24   -Name - The name of this component that can be colorized. Used internally to mark some text styles, and also used to refer to this component from other components. (NSString)
25   -Color - The default color to use for coloring this component. This will only be used when the user didn't specify a different color in the NSUserDefaults. Colors in the user defaults should have the key "SyntaxColoring:Color:COMPNAME" where COMPNAME is the name you specified as "Name" for this component. (NSArray, Red, Green, Blue, Alpha)
26   -Type - The type of this component. This can be any one of "String", "BlockComment", "Tag", "OneLineComment" or "Keywords" and decides what other keys you should put into this component. (NSString)
27   -Start - The character or character sequence that indicates the beginning of a range of text belonging to this component. (Not needed for "Keywords"). (NSString)
28   -End - The character or character sequence that indicates the end of a range of text belonging to this component. (Not needed for "Keywords" or "OneLineComment"). (NSString)
29   -EscapeChar - The character to use for indicating an "Escape sequence" in a "String". This character will cause the next character to be ignored in determining if this is an end of a "String". (NSString)
30   -IgnoredComponent - The "Name" of another component in which this "Tag" range may not start or end. This can be used, when parsing HTML tags, to ignore '>' characters when they are specified inside a quoted character, so they're not accidentally considered as being the end of the tag. (NSString)
31   -Keywords - An array of keyword strings to be colorized (Only used for "Keywords"-type components). If this isn't specified for a "Keywords" component, this will look in NSUserDefaults for an array under the key "SyntaxColoring:Keywords:COMPNAME", where COMPNAME is the "Name" you specified for this component. You can use this to colorize keywords or to colorize user-defined keywords. (NSArray of NSStrings)
32   -Charset - All characters that are valid in a keyword for this "Keywords" style. Specify both upper- and lowercase characters separately. If this is specified, only keywords that are preceded and followed by characters not listed here will be colored, thus enforcing complete matches. Otherwise, parts of keywords will be colored as well, if they match an item in the "Keywords" list. (NSString)
  24 +###Name
  25 +The name of this component that can be colorized. Used internally to mark some text styles, and also used to refer to this component from other components. (NSString)
  26 +
  27 +###Color
  28 +The default color to use for coloring this component. This will only be used when the user didn't specify a different color in the NSUserDefaults. Colors in the user defaults should have the key "SyntaxColoring:Color:COMPNAME" where COMPNAME is the name you specified as "Name" for this component. (NSArray, Red, Green, Blue, Alpha)
  29 +
  30 +###Type
  31 +The type of this component. This can be any one of "String", "BlockComment", "Tag", "OneLineComment" or "Keywords" and decides what other keys you should put into this component. (NSString)
  32 +
  33 +###Start
  34 +The character or character sequence that indicates the beginning of a range of text belonging to this component. (Not needed for "Keywords"). (NSString)
  35 +
  36 +###End
  37 +The character or character sequence that indicates the end of a range of text belonging to this component. (Not needed for "Keywords" or "OneLineComment"). (NSString)
  38 +
  39 +###EscapeChar
  40 +The character to use for indicating an "Escape sequence" in a "String". This character will cause the next character to be ignored in determining if this is an end of a "String". (NSString)
  41 +
  42 +###IgnoredComponent
  43 +The "Name" of another component in which this "Tag" range may not start or end. This can be used, when parsing HTML tags, to ignore '>' characters when they are specified inside a quoted character, so they're not accidentally considered as being the end of the tag. (NSString)
  44 +
  45 +###Keywords
  46 +An array of keyword strings to be colorized (Only used for "Keywords"-type components). If this isn't specified for a "Keywords" component, this will look in NSUserDefaults for an array under the key "SyntaxColoring:Keywords:COMPNAME", where COMPNAME is the "Name" you specified for this component. You can use this to colorize keywords or to colorize user-defined keywords. (NSArray of NSStrings)
  47 +
  48 +###Charset
  49 +All characters that are valid in a keyword for this "Keywords" style. Specify both upper- and lowercase characters separately. If this is specified, only keywords that are preceded and followed by characters not listed here will be colored, thus enforcing complete matches. Otherwise, parts of keywords will be colored as well, if they match an item in the "Keywords" list. (NSString)
33 50
34 51 Colorizing is done in the order the components are listed in the array. So, if
35 52 you colorize strings first and comments afterward, any strings occurring inside
@@ -41,7 +58,8 @@ use to determine the syntax coloring file to use for an opened file.
41 58
42 59 Currently, you can also put the following optional keys in the dictionary:
43 60
44   -OneLineCommentPrefix - A string that will be used by the action method -toggleCommentForSelection: to determine what comment character sequence to look for/to add. Note that if this entry has leading or trailing whitespace, that whitespace will be added when inserting a new comment, but when trying to determine whether a line has a comment that should be removed, it will also match the string without the whitespace. This could cause problems in languages where whitespace is syntactically relevant.
  61 +###OneLineCommentPrefix
  62 +A string that will be used by the action method -toggleCommentForSelection: to determine what comment character sequence to look for/to add. Note that if this entry has leading or trailing whitespace, that whitespace will be added when inserting a new comment, but when trying to determine whether a line has a comment that should be removed, it will also match the string without the whitespace. This could cause problems in languages where whitespace is syntactically relevant.
45 63
46 64
47 65 ##License
@@ -65,18 +83,25 @@ freely, subject to the following restrictions:
65 83
66 84 ##Revisions
67 85 0.1 - First public release.
  86 +
68 87 0.1.1 - Fixed a tiny bug that could cause a crash when the last character in the document was deleted. Removed a couple of outdated files and added some missing identifiers to the example SyntaxDefinition.plist.
  88 +
69 89 0.1.5 - Added option to maintain indentation of previous line for new lines when a return key is typed, added accessors for auto syntax coloring and maintain indentation flags.
  90 +
70 91 0.2.0 - Added "Identifiers2" list, "comments2", coloring of "tags", -syntaxDictionary method, support for specifying the escape character for coloring strings, HTML sample syntax definition, leaving out the charset for identifiers, icons indicating selection type, UKSCTDColorWellPrefsController, new-style syntax definitions and UKSCTDUserIdentifiersPrefsController, and UKMultiSyntaxColoredTextDocument.
  92 +
71 93 0.3.0 - Fixed exceptions when undoing, hopefully finally fixed the bug where editing an empty document would occasionally crash.
  94 +
72 95 0.4.0 - Fixed indent/unindent to not indent the next line after a full-line (triple click) selection and made it support undo. Made "new" ObjC coloring scheme support user identifiers, added more identifiers. Multi syntax colored document now tries to pick the right syntax coloring definition file based on extension. Misc. stability fixes.
  96 +
73 97 0.5.0 - Various improvements to undo, comment/uncomment menu item, actual syntax coloring code now extracted into a view controller. Removed support for old-style syntax definitions. Prettier top bar containing status messages.
74 98
75 99
76 100 ##Contact Information
77 101
78 102 You can find the newest version of UKSyntaxColoredTextDocument at
79   - http://github.com/uliwitness/UKSyntaxColoredTextDocument
  103 +
  104 +http://github.com/uliwitness/UKSyntaxColoredTextDocument
80 105
81 106 E-Mail: witness_dot_of_dot_teachtext_at_gmx_dot_net
82 107

0 comments on commit 1e64aae

Please sign in to comment.
Something went wrong with that request. Please try again.