My Emacs config file

Table of Contents

1 My Emacs File

;;; .emacs --- Emacs init file

;;; Commentary:
;; 

;;; Code:

;; Initialize packages before .emacs file.
(setq package-enable-at-startup nil)
(package-initialize)

;; Enable CEDET (http://cedet.sourceforge.net/).
(load-file "~/work/GitHub/cedet/cedet-devel-load.el")
(semantic-mode 1)                       ;parse buffers
(global-ede-mode 1)                     ;project management
(require 'semantic/db-javap)            ;get Java tags from JARS
(require 'semantic/analyze/debug)       ;enable debugging of Semantic Analyzer
(require 'semantic/wisent/java)         ;the Wisent parser for Java is better

;; Load additional features.
(require 'generic-x)                    ;Emacs built-in generic modes
(require 'genrnc)                       ;Generate RNC schema from XSD
(require 'ensime)                       ;Better Scala mode
(require 'ido-grid-mode)                ;Better ido display
(require 'meghanada)                    ;Better Java mode

;; Enable/disable additional global modes.
(ido-grid-mode)
;;(global-company-mode)
;;(global-magit-file-mode)
(yas-global-mode)
(ido-ubiquitous-mode)
(delete-selection-mode 1)

;; Set up additional mode hooks.
;;(add-hook 'company-mode-hook 'company-quickhelp-mode)

;; Set up additional keybindings.
(global-set-key (kbd "C-x f") 'find-file-in-repository)
;;(global-set-key (kbd "C-x SPC") 'company-complete)
(global-set-key (kbd "C-x g") 'magit-status)
(global-set-key (kbd "C-x M-g") 'magit-dispatch-popup)
(global-set-key (kbd "M-x") 'smex)
(global-set-key (kbd "C-c o") 'ido-occur)
(global-set-key (kbd "C-c O") 'ido-occur-at-point)

;; Set up additional auto modes.
(add-to-list 'auto-mode-alist '("\\.hgrc" . ini-generic-mode))
(add-to-list 'auto-mode-alist '("\\.bsh" . java-mode))
(add-to-list 'auto-mode-alist '("\\.info" . Info-on-current-buffer))

;; Set up additional key-bindings.
(define-key emacs-lisp-mode-map (kbd "C-c e") 'macrostep-expand)
(define-key global-map "\C-cc" 'org-capture)

;; Set up mode hooks
(add-hook 'semantic-init-db-hook (lambda () (local-set-key (kbd "C-c . j") 'semantic-ia-fast-jump)))
(add-hook 'java-mode-hook (lambda () (meghanada-mode t)))

;; Load customizations from separate file.
(setq custom-file "~/.emacs-custom.el")
(load custom-file)

(provide '.emacs)

;;; .emacs ends here