Skip to content

Commit 33fc9c7

Browse files
committed
🎉 Xcode 8
1 parent 080505e commit 33fc9c7

File tree

3 files changed

+39
-78
lines changed

3 files changed

+39
-78
lines changed

README.md

+18-67
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
XAlign
1+
XAlign (Ready for Xcode 8+ 🚀)
22
======
33

44
An amazing Xcode plugin to align regular code. It can align anything by using custom alignment patterns.
55

66
## What's XAlign
77

8-
Here are some example alignment patterns. Of course you can make your own. The pattern file is here: `XAlign/patterns.plist`, and the patterns are based on regular expression.
8+
Here are some example alignment patterns. Of course you can make your own. The pattern file is here: `/Source/Patterns.bundle/default.plist`, and the patterns are based on regular expression.
99

1010
**Tips**:
1111

12-
* _You may not like the alignment style below, **try it yourself** or **tell me at the [[Issues]](https://github.com/qfish/XAlign/issues?state=open)**._ :)
12+
* _You may not like the alignment style below, **try it yourself** or **tell me at the [Issues](https://github.com/qfish/XAlign/issues?state=open)**._ :)
1313
* There is no need to align all codes at a time when they are complicated, try to align by group which the codes are more similar in.
1414
* 对齐不需要一次全部对齐,可以分组多对几次,那些等号差的太远的就别让它参与对齐了。
1515
* 默认对齐的风格不是你喜欢的,可以自定义,或者提个 [Issues](https://github.com/qfish/XAlign/issues?state=open)
@@ -27,74 +27,26 @@ Here are some example alignment patterns. Of course you can make your own. The p
2727

2828
- [x] Much easier to customize alignment patterns.
2929

30-
## Install & Update
30+
## Install on Xcode 8
31+
1. Download the [XAlign.dmg 📎](https://github.com/qfish/XAlign/releases/download/untagged-37425b5c3153fd315072/XAlign.1.0.dmg)
32+
2. Open and copy `XAlign.app` to `/Applications` folder
33+
3. Run it then close it.
3134

32-
### Via source
33-
34-
1. Clone this repo
35-
36-
2. Then build the `XAlign` target in the Xcode project and the plug-in will automatically be installed in `~/Library/Application Support/Developer/Shared/Xcode/Plug-ins`
37-
38-
3. Restart Xcode.
39-
40-
### Via command-line
41-
42-
```shell
43-
curl -fsSL http://qfi.sh/XAlign/build/install.sh | sh
44-
```
45-
46-
### Manually
47-
48-
1. Download this package [XAlign.tar.gz](http://qfi.sh/XAlign/build/XAlign.tar.gz)
49-
2. Unpack it, copy or move the `XAlign.xcplugin` to the following path:
50-
```
51-
~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/
52-
```
53-
Tips: To quickly go to Finder type `Shift + Cmd + G`. If there is no `Plug-ins` directory, you should make one.
35+
## Usage
36+
### 1. Enable XAlign
37+
Check <kbd>System Preferences</kbd> -> <kbd>Extensions</kbd> -> <kbd>Xocde Source Editor</kbd> -> <kbd>XAlign</kbd>
5438

55-
3. Restart Xcode.
39+
![help-1](https://cloud.githubusercontent.com/assets/679824/20145614/b86f6742-a6db-11e6-846b-771447ec0933.png)
5640

57-
## Uninstall
58-
```shell
59-
curl -fsSL http://qfi.sh/XAlign/build/uninstall.sh | sh
60-
```
41+
### 2. Setting Shortcut in Xocde
42+
<kbd>Preferences</kbd> -> <kbd>Key bindings</kbd> -> <kbd>Filter: xalign</kbd>
6143

62-
or Delete the following directory:
44+
![help-2](https://cloud.githubusercontent.com/assets/679824/20146079/735244ca-a6dd-11e6-83a9-069fd489b0f6.png)
6345

64-
```
65-
~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XAlign.xcplugin
66-
```
46+
## Trouble Shooting
47+
* Please `run sudo /usr/libexec/xpccachectl` and **restart your Mac** before running the extension if you are on macOS 10.11 El Capitan.
48+
* If you are looking for the version supporting Xcode 7, check this branch;
6749

68-
## Usage
69-
### In Xcode
70-
```
71-
Xcode -> Edit -> XAlign
72-
```
73-
74-
### Auto Align Shortcut (default)
75-
```
76-
Shift + Cmd + X
77-
```
78-
You can choose the shortcut in the Settings panel, `Xcode -> Edit -> XAlign -> Setting`.
79-
80-
## Trouble-Shooting
81-
82-
* [wiki](https://github.com/qfish/XAlign/wiki)
83-
84-
### New version Xcode ? Try this in your terminal :
85-
86-
1. Get current Xcode UUID
87-
88-
```shell
89-
XCODEUUID=`defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID`
90-
```
91-
2. Write it into the Plug-ins's plist
92-
93-
```shell
94-
for f in ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/*; do defaults write "$f/Contents/Info" DVTPlugInCompatibilityUUIDs -array-add $XCODEUUID; done
95-
```
96-
3. Restart your Xcode, and select <kbd>Load Bundles</kbd> on the alert
97-
9850
## Want to help
9951

10052
* [Star this repository](https://github.com/qfish/XAlign/)
@@ -103,12 +55,11 @@ You can choose the shortcut in the Settings panel, `Xcode -> Edit -> XAlign -> S
10355

10456
## Special thanks to
10557

106-
* [![Geek-Zoo](http://geek-zoo.com/img/images/logo_2.png)](http://www.geek-zoo.com)
58+
* <img src="http://geek-zoo.com/img/logo-dark.png" alt="Geek Zoo Studio" height="20px" /> <a href="http://www.geek-zoo.com" target="_blank">Geek Zoo Studio</a>
10759

10860
They provide awesome design and development works continues to help the open-source community even better.
10961

11062

11163
* [BeeFramework](https://github.com/gavinkwoe/BeeFramework)
11264

11365
BeeFramework is a new generation of development framework which makes faster and easier app development, Build your app by geek's way.
114-

XAlign.xcodeproj/project.pbxproj

-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
E93E2AC21DCB914400F7BEA4 /* NSString+XAlign.m in Sources */ = {isa = PBXBuildFile; fileRef = E93E2ABF1DCB914400F7BEA4 /* NSString+XAlign.m */; };
2020
E93E2AC31DCB914400F7BEA4 /* XAlignPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = E93E2AC11DCB914400F7BEA4 /* XAlignPattern.m */; };
2121
E93E2AC51DCB93FA00F7BEA4 /* Patterns.bundle in Resources */ = {isa = PBXBuildFile; fileRef = E93E2AC41DCB93FA00F7BEA4 /* Patterns.bundle */; };
22-
E93E2AC61DCB93FA00F7BEA4 /* Patterns.bundle in Resources */ = {isa = PBXBuildFile; fileRef = E93E2AC41DCB93FA00F7BEA4 /* Patterns.bundle */; };
2322
/* End PBXBuildFile section */
2423

2524
/* Begin PBXContainerItemProxy section */
@@ -268,7 +267,6 @@
268267
isa = PBXResourcesBuildPhase;
269268
buildActionMask = 2147483647;
270269
files = (
271-
E93E2AC61DCB93FA00F7BEA4 /* Patterns.bundle in Resources */,
272270
);
273271
runOnlyForDeploymentPostprocessing = 0;
274272
};

XAlign/Base.lproj/Main.storyboard

+21-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="11542" systemVersion="16A323" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
33
<dependencies>
4-
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11134"/>
4+
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11542"/>
5+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
56
</dependencies>
67
<scenes>
78
<!--Application-->
@@ -653,7 +654,7 @@
653654
<outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
654655
</connections>
655656
</application>
656-
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModuleProvider=""/>
657+
<customObject id="Voe-Tx-rLC" customClass="AppDelegate"/>
657658
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
658659
</objects>
659660
<point key="canvasLocation" x="75" y="0.0"/>
@@ -665,7 +666,7 @@
665666
<window key="window" title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
666667
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
667668
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
668-
<rect key="contentRect" x="196" y="240" width="480" height="270"/>
669+
<rect key="contentRect" x="196" y="240" width="232" height="115"/>
669670
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
670671
</window>
671672
<connections>
@@ -674,20 +675,31 @@
674675
</windowController>
675676
<customObject id="Oky-zY-oP4" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
676677
</objects>
677-
<point key="canvasLocation" x="75" y="250"/>
678+
<point key="canvasLocation" x="-49" y="172.5"/>
678679
</scene>
679680
<!--View Controller-->
680681
<scene sceneID="hIz-AP-VOD">
681682
<objects>
682-
<viewController id="XfG-lQ-9wD" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
683+
<viewController id="XfG-lQ-9wD" customClass="ViewController" sceneMemberID="viewController">
683684
<view key="view" wantsLayer="YES" id="m2S-Jp-Qdl">
684-
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
685+
<rect key="frame" x="0.0" y="0.0" width="232" height="144"/>
685686
<autoresizingMask key="autoresizingMask"/>
687+
<subviews>
688+
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ZGh-qz-b10">
689+
<rect key="frame" x="41" y="63" width="150" height="17"/>
690+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
691+
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Made by QFish with ❤️." id="d4S-YN-NQ8">
692+
<font key="font" metaFont="system"/>
693+
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
694+
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
695+
</textFieldCell>
696+
</textField>
697+
</subviews>
686698
</view>
687699
</viewController>
688700
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
689701
</objects>
690-
<point key="canvasLocation" x="75" y="655"/>
702+
<point key="canvasLocation" x="-49" y="444"/>
691703
</scene>
692704
</scenes>
693705
</document>

0 commit comments

Comments
 (0)