GithubHelp home page GithubHelp logo

bellyabc123 / xbrace Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aral/xbrace

0.0 2.0 0.0 124 KB

A command line tool that makes Xcode’s system code snippets put the braces on new lines instead of on the same line.

xbrace's Introduction

Xbrace — get your braces on the next line in Xcode

I was teaching my Modern iOS Development workshop today when Jamie, one of my students, asked if there was an easy way to get Xcode to put your braces on the next line in the built‐in system code snippets. I knew there used to be an easy way but that disappeared with Xcode 4. Googling it tonight, I found this post by Doug Stephen and this StackOverflow thread that suggested hacking the System Code Snippets file. The problem is that you have to do it anew with every version of Xcode. Who has the time? So, instead, I decided to whip up a quick command line app to automate the process.

I’ve tested this with Xcode 4.6 and it appears to work.

Usage:

  1. Download xbrace and copy it to /usr/local/bin or somewhere else that’s cosy (and on your path)
  2. sudo xbrace
  3. Enter your administrative password when prompted.

That’s it!

A note on backups:

Xbrace will back up your snippets file to your root folder (/). It will not overwrite existing backups so you cannot accidentally overwrite the backup by running it multiple times (although there is no reason to do that, of course).

Limitations

Use at your own risk. I haven’t tested this thoroughly. Also, when a new version of Xcode comes out, you need to manually delete the old backup to have new snippets file backed up. I plan to implement a more elegant way of handling this.

xbrace's People

Contributors

aral avatar

Watchers

AAA avatar James Cloos 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.