Skip to content

Instantly share code, notes, and snippets.

@teopeurt
Last active September 28, 2015 20:08
Show Gist options
  • Select an option

  • Save teopeurt/1489980 to your computer and use it in GitHub Desktop.

Select an option

Save teopeurt/1489980 to your computer and use it in GitHub Desktop.
emacs config
;; include ALL org files from a directory into the agenda
(setq org-agenda-files (list "~/DIR/file.org"
))
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
;; Headlines
'("^\\(\\**\\)\\(\\* \\)\\(.*\xa\\)" (1 (org-get-level-face 1))
(2 (org-get-level-face 2)) (3 (org-get-level-face 3)))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
;; ========== Place Backup Files in Specific Directory ==========
;; Enable backup files.
(setq make-backup-files t)
;; Enable versioning with default values (keep five last versions, I think!)
(setq version-control t)
;; Save all backup file in this directory.
(setq backup-directory-alist (quote ((".*" . "~/.emacs_backups/"))))
;; ========== Enable Line and Column Numbering ==========
;; Show line-number in the mode line
(line-number-mode 1)
;; Show column-number in the mode line
(column-number-mode 1)
;; ===== Turn on Auto Fill mode automatically in all modes =====
;; Auto-fill-mode the the automatic wrapping of lines and insertion of
;; newlines when the cursor goes over the column limit.
;; This should actually turn on auto-fill-mode by default in all major
;; modes. The other way to do this is to turn on the fill for specific modes
;; via hooks.
(setq auto-fill-mode 1)
;; ========= Set colours ==========
;; Set cursor and mouse-pointer colours
;;(set-cursor-color "red")
;;(set-mouse-color "goldenrod")
;; Set region background colour
;; (set-face-background 'region "LightSteelBlue")
;; Set emacs background colour
(set-background-color "grey10")
;; Set global foreground Colour
(set-foreground-color "FloralWhite")
;; other options
;; LavenderBlush FloralWhite ivory1 GhostWhite WhiteSmoke
;; (set-frame-parameter (selected-frame) 'alpha '(85 50))
;; ========= Set Font Size =========
;; font size is scalled by 1/10pt, so obtain 10 - use 100
(set-face-attribute 'default nil :height 90)
;; ========= Disable Menu ==========
;; arg >= 1 enable the menu bar. Menu bar is the File, Edit, Options,
;; Buffers, Tools, Emacs-Lisp, Help
;; (menu-bar-mode 0)
;; With numeric ARG, display the tool bar if and only if ARG is
;; positive. Tool bar has icons document (read file), folder (read
;; directory), X (discard buffer), disk (save), disk+pen (save-as),
;; back arrow (undo), scissors (cut), etc.
(tool-bar-mode 0)
;; ======== yasnippet ===============
;;(add-to-list 'load-path
;; "~/.emacs.d/plugins/yasnippet")
;;(require 'yasnippet) ;; not yasnippet-bundle
;;(yas/global-mode 1)
;; ====== Scala mode =================
(add-to-list 'load-path "~/.emacs.d/plugins/scala-mode")
(require 'scala-mode-auto)
;; scala yasnippets
;; (setq yas/my-directory "/home/onwunuma/.emacs.d/plugins/scala-mode/contrib/yasnippet/snippets")
;; (yas/load-directory yas/my-directory)
;; (add-hook 'scala-mode-hook
;; '(lambda ()
;; (yas/minor-mode-on)
;; ))
;; ====== Android-Mode auto starts ======================
;; (require 'android-mode)
;; (setq android-mode-sdk-dir "~/Development/android-sdk-mac_x86")
;; ====== Load Android el for JDB ===================
;; (add-to-list 'load-path "~/.emacs.d/plugins")
;; (require 'android)
;; ===== AutoComplete ====================================
(add-to-list 'ac-dictionary-directories "~/.emacs.d/el-get/auto-complete/dict")
(require 'auto-complete-config)
(ac-config-default)
;; ==== jdee ==========
(add-to-list 'load-path "~/.emacs.d/plugins/elib")
(add-to-list 'load-path "~/.emacs.d/plugins/jdee/lisp")
;; -------- cedet --------------
(global-ede-mode t)
(semantic-load-enable-minimum-features)
(require 'semantic-ia)
(require 'semantic-gcc)
(semantic-add-system-include "~/exp/include/boost_1_37" 'c++-mode)
;; http://alexott.net/en/writings/emacs-devenv/EmacsCedet.html
;; === Emacs Code Browser ====================================
;; [http://ecb.sourceforge.net/]
;;(add-to-list 'load-path
;; "~/.emacs.d/plugins/ecb")
;; (load-file "ecb/ecb.el")
;; want to load the complete ECB at (X)Emacs-loadtime (Advantage:
;; All ECB-options available after loading ECB. Disadvantage: Increasing loadtime
;; (require 'ecb)
;; Want to load the ECB only after starting it by ecb-activate
(require 'ecb-autoloads)
;; ========= Undo-tree.el ====================================
(require 'undo-tree)
;; ========= Devil Mode ======================================
;;(require 'evil)
;;(evil-mode 1)
;; ---------------------------JDEEE---------------------------
;; If you want Emacs to defer loading the JDE until you open a
;; Java file, edit the following line
(setq defer-loading-jde nil)
;; to read:
;;
;; (setq defer-loading-jde t)
;;
(if defer-loading-jde
(progn
(autoload 'jde-mode "jde" "JDE mode." t)
(setq auto-mode-alist
(append
'(("\\.java\\'" . jde-mode))
auto-mode-alist)))
(require 'jde))
;; Sets the basic indentation for Java source files
;; to two spaces.
(defun my-jde-mode-hook ()
(setq c-basic-offset 2))
(add-hook 'jde-mode-hook 'my-jde-mode-hook)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment