XTextHandler - Xcode Source Editor Extension Tools (Xcode 8 Plugins)

Overview

Download

Let's Swift!

Language License

xTextHandler has been rewritten in Swift. The Objective-C version can be found in: https://github.com/cyanzhong/xTextHandler-objc

๐Ÿ‡จ๐Ÿ‡ณ ไธญๆ–‡ไป‹็ป

xTextHandler

Xcode Source Editor Extension Tools (Xcode 8 Plugins)

What is it

Xcode Source Editor Extension based tools to improve the text editing experience of Xcode 8 and provide extensions with simple code.

Features

  • Multiline Selections
  • Multiple Extensions
  • Extendable (Example: Dotify)
  • Swift 3.0
  • Clipboard Text Handling (if no selection is made)
  • Regular Expression Matching
  • Error handling
  • Preferences panel
  • JavaScript for text handling

Install from Mac App Store

  1. Clear DrivedData if you built xTextHandler before
  2. Install from: https://itunes.apple.com/app/id1163761963
  3. Open Xcode and select text
  4. Open Editor menu to find extensions
  5. You can set a shortcut (Key-Binding) for each extension
  6. If you got nothing after installed, it must be a bug of XcodeKit, you can try build this project

Setup if there's nothing on the Editor menu

image image

Build

  1. Install Xcode 8
  2. sudo /usr/libexec/xpccachectl in macOS EI Capitan
  3. Sign every targets (app & extensions) using your developer certificate
  4. Build & Run
  5. Choose Xcode 8 to debug (Or restart Xcode)
  6. Select text
  7. Open Editor menu to find extensions
  8. You can set a shortcut (Key-Binding) for each extension

xEncode

image

  • Base64 Encode
  • Base64 Decode
  • URL Encode
  • URL Decode
  • Upper Case
  • Lower Case
  • Escape
  • MD5
  • SHA1
  • SHA256
  • QR Code

xRadix

image

  • Hex
  • Bin
  • Oct
  • Dec

xColor

image

  • Hex
  • RGB
  • Preview

xSearch

image

  • Google
  • Translate
  • Developer
  • StackOverflow
  • GitHub
  • Dash
  • Dictionary

xFormat

image

  • JSON
  • XML
  • CSS
  • SQL

Thanks to: vkBeautify

How to write a new Extension

Add definition in Plist:

<dict>
    <key>XCSourceEditorCommandClassName</key>
    <string>aClassName</string>
    <key>XCSourceEditorCommandIdentifier</key>
    <string>test.extension</string>
    <key>XCSourceEditorCommandName</key>
    <string>Test Extension</string>
</dict>

Map handler via commandIdentifier in class:

// Implement your modify strategy using block (you can implement as singleton dict)
// [ "commandIdentifier": handler ]
override func handlers() -> Dictionary<String, xTextModifyHandler> {
    return [
        "test.extension": { text: String -> String in text }
    ]
}

* Handle with regex:

// Override performCommandWithInvocation like that
override func perform(with invocation: XCSourceEditorCommandInvocation, completionHandler: (NSError?) -> Void) {
    if let handler = self.handlers()[invocation.commandIdentifier] {
        xTextModifier.select(invocation: invocation, pattern: "regex", handler: handler)
    }
    completionHandler(nil)
}

Contacts

Weibo Twitter Email

You might also like...
This Xcode plugin shows Xcode app version in the Dock and App Switcher icon
This Xcode plugin shows Xcode app version in the Dock and App Switcher icon

Xcode Icon Version Tired of this Xcode icon always showing multiple times in your App Switch with no help watshoever as to which version you are curre

Snowonder - ๐Ÿ”ฎ Magical import declarations formatter for Xcode
Snowonder - ๐Ÿ”ฎ Magical import declarations formatter for Xcode

Snowonder is Xcode Extension that adds some convenient formatting operations for Import Declarations. This extension is created with latest stable Swi

XVim2 - Vim key-bindings for Xcode 9

XVim2 XVim2 is a Vim plugin for Xcode intending to offer a compelling Vim experience without the need to give up any Xcode features. Xcode 9 or above,

Xcode plugin to let you jump to GitHub History, Blame, PRs, Issues, Notifications of any GitHub repo with one shortcut.
Xcode plugin to let you jump to GitHub History, Blame, PRs, Issues, Notifications of any GitHub repo with one shortcut.

Reveal-In-GitHub Xcode plugin to let you jump to GitHub History, Blame, PRs, Issues, Notifications of current repo in one second. My company work on G

Plugin for Xcode to integrate the Reveal App to your project automatic.
Plugin for Xcode to integrate the Reveal App to your project automatic.

Reveal-Plugin-for-Xcode Plugin for Xcode to integrate the Reveal App to your project automatic(Without any modifications to your project). Please note

Xcode plugin which help you write code faster.
Xcode plugin which help you write code faster.

MLAutoReplace Xcode plugin, Re-Intent, make you write code more quickly. Use a portion code of VVDocumenter-Xcode. ##Overview You can use shortcut key

CleanClosureXcode - An Xcode Source Editor extension to clean the closure syntax.
CleanClosureXcode - An Xcode Source Editor extension to clean the closure syntax.

Clean Closure - Xcode Source Editor Extension Clean Closure is a simple Xcode Source Editor Extension for Xcode 8. It parses each line of a file to si

DocumenterXcode - Attempt to give a new life for VVDocumenter-Xcode as source editor extension.
DocumenterXcode - Attempt to give a new life for VVDocumenter-Xcode as source editor extension.

DocumenterXcode Xcode source editor extension which helps you write documentation comment easier, for both Objective-C and Swift. This project is an a

A Xcode Source Editor Extension to sort your header imports and remove duplicates, similar to iSort.
A Xcode Source Editor Extension to sort your header imports and remove duplicates, similar to iSort.

CleanHeaders An Xcode plug-in to format your import headers in a systematic manner. It simply removes duplicates, spaces and sorts them alphabetically

An Xcode Source Editor Extension that helps navigating to many places easier
An Xcode Source Editor Extension that helps navigating to many places easier

XcodeWay โค๏ธ Support my apps โค๏ธ Push Hero - pure Swift native macOS application to test push notifications PastePal - Pasteboard, note and shortcut man

React-native-photo-editor - Photo editor using native modules for iOS and Android
React-native-photo-editor - Photo editor using native modules for iOS and Android

๐ŸŒ„ Image editor using native modules for iOS and Android. Inherit from 2 available libraries, ZLImageEditor (iOS) and PhotoEditor (Android)

A fully fledged syscfg editor. Just the editor. Written in pure swift.
A fully fledged syscfg editor. Just the editor. Written in pure swift.

MagicCFG Reloaded The SysCFG Writing Utility - UPDATED, OSV Report Bug Table of Contents About MagicCFG Reloaded Getting Started Roadmap Contact Credi

adb-tools-mac is a macOS menu bar app written in SwiftUI for common adb tools.
adb-tools-mac is a macOS menu bar app written in SwiftUI for common adb tools.

adb-tools-mac is a macOS menu bar app written in SwiftUI for common adb tools.

The template for Delta Client plugins.

Delta Plugin Template This repository is a template for Delta Client plugins. To create a plugin, create a repo from this template repo and then repla

A repository of example plugins for Delta Client

Example Plugins for Delta Client This repository contains a few example plugins to help developers get a practical understanding of how to use the plu

A library for creating Stream Deck plugins in Swift.

StreamDeck A library for creating Stream Deck plugins in Swift. Usage Your plugin class should inherit from StreamDeckPlugin, which handles the WebSoc

๐Ÿงš RxSwift + Moya + HandyJSON + Plugins.

RxNetworks ๐Ÿงš . RxSwift + Moya + HandyJSON + Plugins. ๐Ÿ‘’ ๐Ÿ‘’ ๐Ÿ‘’ English | ็ฎ€ไฝ“ไธญๆ–‡ This is a set of infrastructure based on RxSwift + Moya MoyaNetwork This

SwiftHooks is a little module for plugins, in Swift
SwiftHooks is a little module for plugins, in Swift

A Hook represents a "pluggable" point in a software model. They provide a mechanism for "tapping" into such points to get updates, or apply additional functionality to some typed object.

A collection of Swift Package Manager plugins.

KipplePlugins A collection of Swift Package Manager plugins. โš ๏ธ The code in this library has been made public as-is for the purposes of education, dis

Releases(1.0)
DocumenterXcode - Attempt to give a new life for VVDocumenter-Xcode as source editor extension.

DocumenterXcode Xcode source editor extension which helps you write documentation comment easier, for both Objective-C and Swift. This project is an a

Serhii Londar 34 Dec 17, 2022
SwiftInitializerGenerator - Xcode Source Code Extension to Generate Swift Initializers

Swift Initializer Generator This Xcode Source Code Extension will generate a Swift initializer based on the lines you've selected. Handy if you made a

Bouke Haarsma 718 Aug 21, 2022
XcodeEquatableGenerator - Xcode 8 Source Code Extension will generate conformance to Swift Equatable protocol based on type and fields selection.

Depricated! There is not need for it at the moment as Swift compiler can do that for us ?? Swift Equatable Generator Xcode 8 Source Code Extension wil

null 191 Dec 10, 2022
Multiliner - An Xcode source extension to expand lengthy lines

Multiliner An Xcode source extension to expand lengthy lines. Super lightweight, 1 file. It expands long lines. That's it! Works with: Initializers Fu

Andrew Zheng 629 Jan 4, 2023
Import - Xcode extension for adding imports from anywhere in the code โ˜๏ธ

Import โ˜๏ธ Xcode extension for adding imports from anywhere in the code. Now available on App Store Why? Because sometimes you are on 300th line of cod

Marko Hlebar 839 Nov 10, 2022
Mark - Xcode extension for generating MARK comments.

Mark Xcode extension for automatic generation of MARK comments. Why? If you would like to organize your code with MARK comments, this will save you so

Velislava Yanchina 160 Dec 17, 2022
XShared - Xcode extension that allows you copying the code with special formatting quotes for social (Slack, Telegram)

This extension is for those who like to show code to the public ?? Xcode extension which allows you copying the code with special formatting quotes fo

Nikita Ermolenko 75 Jun 18, 2022
Xgist - Xcode extension to send code to GitHub's Gist

Xgist Xgist is a Xcode extension to send code to GitHub's Gist. The extension will send your code selection to Gist and automatically copy the Gist UR

Fernando Bunn 76 Jul 2, 2022
Comment-Spell-Checker - Xcode extension for spell checking and auto-correcting code comments.

Comment Spell Checker An Xcode Source Editor extension that runs spell check and auto correct on your code comments. Features Supports mutliple commen

Velislava Yanchina 157 Aug 28, 2022
Nef-plugin - ๐Ÿ”Œ an Xcode extension to use nef features easily

This project provides an extension for Xcode to integrate some nef features directly in the IDE. Using the core of nef, you can export snippets from y

Bow 188 Dec 23, 2022