auto-complete + yasnippet
helm + yasnippet
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)
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
Load requirements in this order.
(require 'auto-complete-config)
(ac-config-default)
(setq ac-use-menu-map t)
(require 'yasnippet)
(setq yas-snippet-dirs "~/.emacs.d/lib/snippet") ;; for example
(yas-global-mode 1)
(setq yas-trigger-key (kbd "TAB"))
(yas--initialize)
(require 'helm-config)
(helm-mode 1)
(require 'emaXcode)
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.
M-x emaXcode-open-corresponding-file
M-x emaXcode-make-new-files-subclass-of-NSObject
- 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