-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Krunoslav Zaher
authored and
Krunoslav Zaher
committed
Oct 21, 2014
1 parent
a239278
commit 6eae4f6
Showing
12 changed files
with
190 additions
and
296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.DS_Store | ||
|
||
*.xcodeproj/xcuserdata/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
RegX | ||
==== | ||
|
||
Prettify plugin for Xcode. It enables alignment of specific source code elements and makes code easier to read and understand. | ||
|
||
 | ||
|
||
# Installation | ||
|
||
1. `$ git clone [email protected]:kzaher/RegX.git` | ||
2. Build in Xcode. (building will automagically install it) | ||
3. Restart Xcode and that should be it. | ||
|
||
If it doesn't work, please check messages in console (`Console.app`) while starting Xcode and look for error messages. There is a possibility that you have Xcode version whose DVTPlugInCompatibilityUUID hasn't been specified in Info.plist. To resolve the issue, add your DVTPlugInCompatibilityUUID to Info.plist | ||
|
||
# How does it work? | ||
|
||
RegX uses regular expressions to group text in columns and align those columns. | ||
Every regular expression group creates one vertically aligned column. | ||
Additional settings for columns can be specified. | ||
|
||
# Customization | ||
|
||
All of the regular expressions and settings for them are defined in a file called 'Configuration.swift'. | ||
|
||
e.g. | ||
|
||
```swift | ||
static let assignments = "^" + | ||
" (?# lvalue GROUP)" + | ||
" ([^=]*)" + | ||
" (?# = GROUP)" + | ||
" (\\=) " + | ||
" (?# expression GROUP)" + | ||
" ((?:[^/] | (?:/(?!/)) )*)" + | ||
" (?# comments GROUP)" + | ||
" (//.*)?" + | ||
"$" | ||
``` | ||
|
||
```swift | ||
RegularForm(name: "Assignments", // name in Edit -> RegX menu | ||
pattern: Patterns.assignments, // grouping regular expression | ||
shortcut: String(UnicodeScalar(NSF4FunctionKey)), // shortcut key | ||
modifier: NSEventModifierFlags.CommandKeyMask, // shortcut modifier | ||
settings: [ // each setting controls start and end padding | ||
GroupSettings(nil, 0), // nil means keep existing padding | ||
GroupSettings(1, 1), // value means ensure padding | ||
GroupSettings(0, 0), | ||
GroupSettings(1, 0), | ||
] | ||
) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
RegX.xcodeproj/project.xcworkspace/xcshareddata/RegX.xccheckout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>IDESourceControlProjectFavoriteDictionaryKey</key> | ||
<false/> | ||
<key>IDESourceControlProjectIdentifier</key> | ||
<string>060DE94D-D5C5-47B8-8179-619A12262790</string> | ||
<key>IDESourceControlProjectName</key> | ||
<string>RegX</string> | ||
<key>IDESourceControlProjectOriginsDictionary</key> | ||
<dict> | ||
<key>B6952A2EA6A26CAA10AE5DDD2DF1734B7CAED591</key> | ||
<string>github.com:kzaher/RegX.git</string> | ||
</dict> | ||
<key>IDESourceControlProjectPath</key> | ||
<string>RegX.xcodeproj</string> | ||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key> | ||
<dict> | ||
<key>B6952A2EA6A26CAA10AE5DDD2DF1734B7CAED591</key> | ||
<string>../..</string> | ||
</dict> | ||
<key>IDESourceControlProjectURL</key> | ||
<string>github.com:kzaher/RegX.git</string> | ||
<key>IDESourceControlProjectVersion</key> | ||
<integer>111</integer> | ||
<key>IDESourceControlProjectWCCIdentifier</key> | ||
<string>B6952A2EA6A26CAA10AE5DDD2DF1734B7CAED591</string> | ||
<key>IDESourceControlProjectWCConfigurations</key> | ||
<array> | ||
<dict> | ||
<key>IDESourceControlRepositoryExtensionIdentifierKey</key> | ||
<string>public.vcs.git</string> | ||
<key>IDESourceControlWCCIdentifierKey</key> | ||
<string>B6952A2EA6A26CAA10AE5DDD2DF1734B7CAED591</string> | ||
<key>IDESourceControlWCCName</key> | ||
<string>RegX</string> | ||
</dict> | ||
</array> | ||
</dict> | ||
</plist> |
49 changes: 0 additions & 49 deletions
49
RegX.xcodeproj/xcuserdata/kzaher.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
This file was deleted.
Oops, something went wrong.
80 changes: 0 additions & 80 deletions
80
RegX.xcodeproj/xcuserdata/kzaher.xcuserdatad/xcschemes/RegX.xcscheme
This file was deleted.
Oops, something went wrong.
96 changes: 0 additions & 96 deletions
96
RegX.xcodeproj/xcuserdata/kzaher.xcuserdatad/xcschemes/UnitTests.xcscheme
This file was deleted.
Oops, something went wrong.
37 changes: 0 additions & 37 deletions
37
RegX.xcodeproj/xcuserdata/kzaher.xcuserdatad/xcschemes/xcschememanagement.plist
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.