Git Product home page Git Product logo

emaxcode's Introduction

Emacs for Objective-C, Xcode

auto-complete + yasnippet

auto-complete + yasnippet

helm + yasnippet

helm + yasnippet

Environment

I don't care other than this environment. Additionary, I change this package on a whim.

  • Mac OSX 10.8.5 (MBPR2012)
  • Xcode 5.1.1
  • Emacs Cocoa 24.3.1 (from Homebrew)

Requirement

As of May 26 2014, these are latest package

  • auto-complete.el 1.4.0
  • yasnippet.el 0.8.0
  • helm.el 1.5.6
  • s.el 1.9.0

Simple premise setting for each requirement

Load requirements in this order.

auto-complete

(require 'auto-complete-config)
(ac-config-default)
(setq ac-use-menu-map t)

yasnippet

(require 'yasnippet)
(setq yas-snippet-dirs "~/.emacs.d/lib/snippet") ;; for example
(yas-global-mode 1)
(setq yas-trigger-key (kbd "TAB"))
(yas--initialize)

helm

(require 'helm-config)
(helm-mode 1)

This package

(require 'emaXcode)

Convert messages from Apple's header files to yasnippet

Extract about 4,460 messages/functions from header directories (Foundation.framework, UIKit.framework), and convert them to a yasnippet file .yas-compiled-snippets.el with your existing snippets in objc-mode folder.

If header directory paths changed by Xcode's upgrade, set correct paths list to emaXcode-yas-objc-header-directories-list.

M-x emaXcode-yas-get-objc-messages-from-header-files

After this converting done, .yas-compiled-snippets.el is generated at your objc-mode snippets directory. Restart Emacs, and open Objective-C file. You would realize that it takes a while to load a huge yasnippet file, but is only once.

Switch between header and implementation files

M-x emaXcode-open-corresponding-file

Make new files subclassing from NSObject

M-x emaXcode-make-new-files-subclass-of-NSObject

helm + yasnippet

  • insert snippet: M-x yas-insert-snippet
  • visit & edit snippet: M-x emaXcode-helm-yas-visit-snippet-file
  • make new snippet from the region: M-x emaXcode-yas-new-snippet-from-region

Reference

emaxcode's People

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.