Code Monkey home page Code Monkey logo

mgyky-clang-format's Introduction

mgyky-clang-format

My .clang-format file for using with Objective-C projects.

How to use with latest XCode

  • download latest release of XcodeClangFormat plug-in from https://github.com/mapbox/XcodeClangFormat
  • then, go to System Preferences โ†’ Extensions, and make sure that clang-format in the Xcode Source Editor section is checked
  • edit how you wish and put your .clang-format file in root project directory
  • open XcodeClangFormat.app and show the custom path
  • add your 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
  • Then, use the Format Source Code command in Xcode's Editor menu or use your shortcut like line above
  • tested on: XCode8, XCode9, XCode10, XCode11, macos Catalina 10.15.2 (19C57)
  • Enjoy it! ๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰
  • โญ๏ธ๐Ÿ˜‰

Installing clang-format

To install clang-format for your macOS use command line below:

brew install clang-format

checked again, you'll I found an empty clang-format file in your HOME directory.

If your clang-format application is already installed, you can place your clang-format file at your HOME directory. That will effect all project which hasn't own a ".clang-format" file.

Testing your clang-format on the Terminal

To testing on a file from terminal use command line below:

find . -type f \( -iname "*.m" -o -iname "*.h" \) -exec clang-format -style=file -i {} \;

mgyky-clang-format's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mainstayz

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.