Coder Social home page Coder Social logo

xcodeclangformat's Introduction

XcodeClangFormat

This plugin written for Xcode 8's new plugin infrastructure uses Clang's libclangFormat library to format code according to a .clang-format file.

Open the app, select a predefined style, or open the .clang-format file from your project:

Then, use the Format Source Code command in Xcode's Editor menu:

Due to macOS Sandboxing restrictions, this Plugin behaves slightly differently compared to the command line clang-format command: It always uses the style selected in the configuration app, and will not use the nearest .clang-format file on disk.

Installing

Download the precompiled app or build it yourself, then open the app. You might have to right click on the app bundle, and choose Open to run non-codesigned applications. Then,

  • On OS X 10.11, you'll need to run sudo /usr/libexec/xpccachectl, then reboot to enable app extensions.
  • On macOS Sierra, extensions should be loaded by default.

Keyboard shortcut

To define a keyboard shortcut, open System Preferences, click on Keyboard, and switch to the Shortcuts tab. In the list on the left, select App Shortcuts, then hit the + button. Select Xcode, enter Format Source Code, and define a shortcut of your liking.

Building

To build XcodeClangFormat, run ./configure on the command line, then build the XcodeClangFormat scheme in the included Xcode project.

xcodeclangformat's People

Contributors

kkaefer avatar 1ec5 avatar

Watchers

 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.