GithubHelp home page GithubHelp logo

csquirrel / bbuncrustifyplugin-xcode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benoitsan/bbuncrustifyplugin-xcode

0.0 2.0 0.0 6.37 MB

Xcode plugin to format source code using ClangFormat or Uncrustify

License: MIT License

Objective-C 90.86% C 9.14%

bbuncrustifyplugin-xcode's Introduction

#BBUncrustifyPlugin-Xcode

Xcode plugin to format code using Uncrustify or ClangFormat.

menu

preferences

BBUncrustifyPlugin 2.0

New

  • Added ClangFormat.
  • Preferences window to easily adjust the settings.
  • Opening the formatter configuration in an external editor.
  • Create factory configuration files (in the preferences window).
  • Option to format when saving.

Changes from 1.0 to 2.0

  • Reorganization of the menu: menu items are now in Edit > Format Code.

  • Uncrustify configuration: The configuration file must be located in the current directory or any parent directories of the source file. The file is named .uncrustifyconfig or uncrustify.cfg. Uncrustify looks for the configuration in the additional folders: Home Folder and ~/.uncrustify/uncrustify.cfg.

  • Minimum requirement is Xcode 5.0+ on OS X 10.9+.

Requirements

Xcode 5.0+ on OS X 10.9+.

PS: This fork works with Xcode 3.

Installation

Compiled Version

  • The easiest way to install the plugin is to download the last available release (Click on the green button corresponding to the last version).
  • Unzip and copy UncrustifyPlugin.xcplugin to ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins.
  • Relaunch Xcode after the copy.

Build from Source

  • Build the Xcode project. The plug-in will automatically be installed in ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins.

  • Relaunch Xcode.

To uninstall, just remove the plugin from ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins and restart Xcode.

How does it work?

All the commands are in the menu Edit > Format Code.

  • Use the menu Format Selected Files to format the selected items in the project navigator.

  • Use the menu Format Active File to format the source file actually opened in the editor.

  • Use the menu Format Selected Lines to format the selected source code (multiple selection is supported). The selection is automatically extended in full lines. If the selection is empty, it uses the line under the cursor.

  • Use the menu Edit Configuration to edit the formatter configuration in an external editor.

  • Use the menu BBUncrustifyPlugin Preferences to change the plugin preferences.

Notes

When the code is reformated, the modifications are recorded in the undo. So undo reverts the modifications.

The Preferences window contains detailed informations to customize the formatter settings.

You can create keyboard shortcuts for the menu items in the Keyboard Preferences of OS X System Preferences.

Creator

Benoît Bourdon (@benoitsan). Thanks to the Contributors!

Additional contributors actually not listed here: Dominik Pich.

License

BBUncrustifyPlugin is available under the MIT license. See the LICENSE file for more info.

bbuncrustifyplugin-xcode's People

Contributors

benoitsan avatar darrarski avatar hsarret avatar ishikawa avatar jessthrysoee avatar kejinlu avatar monowerker avatar sugarmo avatar tonyarnold avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.