Hs-Yeah / MLAutoReplace

XCode plugin, Re-Intent,write getters quickly, and custom your own regex replacer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MLAutoReplace

XCode plugin , Thanks for VVDocumenter-Xcode.

##Overview You can use shortcut key Shift+Command+\ to auto re-indent all source of the current edit file.

You can custom other replacer with regex.
replace getter

You can input common getter quickly.
replace getter

##Re-Indent

Just can be quickly re-intent.

If you find that press Shift+Command+\ does nothing.
Please ensure that the shortcut key setting of Re-Intent is default. re-intent shortcut key setting

##Getter replacer

You need add your own common syntax to the getter replacer.
replace getter

<name> means the property name.
<#xxx#> means where need to input in,it is recommended to provide.

Exmple:

- (UIImageView *)<name>
{
    if (!_<name>) {
		UIImageView *imageView = [[UIImageView alloc]init];
        imageView.image = [UIImage imageNamed:@"<#imageName#>"];
        imageView.contentMode = UIViewContentModeScaleAspectFill;
        <#custom#>

        _<name> = imageView;
    }
    return _<name>;
}

You must reload .plist file with shortcut control+option+command+\ after editing and saving it.
You can also reload it with the Reload .plist Data button in MLAutoReplace window.

##Regex replacer

Exmple:
replace getter
This item means that plugin will replace @s/ to @property (nonatomic, strong) <#custom#>.

The plugin will detect the content of current input line.

About

XCode plugin, Re-Intent,write getters quickly, and custom your own regex replacer


Languages

Language:Objective-C 97.0%Language:C 3.0%