Skip to content

Instantly share code, notes, and snippets.

@take-cheeze
Created June 12, 2011 16:12
Show Gist options
  • Save take-cheeze/1021709 to your computer and use it in GitHub Desktop.
Save take-cheeze/1021709 to your computer and use it in GitHub Desktop.
My ~/.emacs
(add-to-list 'load-path "~/Dropbox/config/emacs/site-lisp")
;; tab setting
(setq default-tab-width 4)
(setq c-basic-offset 4)
(setq c-auto-newline t)
(setq c-tab-always-indent nil)
;; transient-mark-mode
(transient-mark-mode t)
;; inhibit-startup-screen
(setq inhibit-startup-screen t)
;; mode line
(column-number-mode t)
(display-time-mode t)
(display-battery-mode t)
(line-number-mode t)
;; menu bar
(menu-bar-mode nil)
;; delete-selection-mode
(delete-selection-mode t)
;; shift + cursor select
(require `pc-select)
(setq pc-select-selection-keys-only t)
(pc-selection-mode t)
;; hi-line
(global-hl-line-mode t)
;; eshell
(setq eshell-output-filter-functions
(list
'eshell-handle-ansi-color
'eshell-handle-control-codes
'eshell-watch-for-password-prompt))
(add-hook 'eshell-mode-hook 'ansi-color-for-comint-mode-on)
(setq eshell-history-size 1000)
;; enable upcase region
(put 'upcase-region 'disabled nil)
;; visible bell
(setq visible-bell t)
;; character encoding
(coding-system-put 'utf-8 'category 'utf-8)
(set-default-coding-systems 'utf-8)
(set-language-environment "Japanese")
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-buffer-file-coding-system 'utf-8)
(setq default-buffer-file-coding-system 'utf-8)
;; auto complete
;; enable upper select
(define-key global-map "\e[1;2A" [S-up])
;; el-get
(add-to-list 'load-path "~/.emacs.d/el-get/el-get/")
(require 'el-get)
(setq el-get-sources
'(el-get package
(:name auto-complete
:type git
:url "http://github.com/m2ym/auto-complete.git"
:load-path "."
:post-init (lambda()
(require 'auto-complete)
(add-to-list 'ac-dictionary-directories (expand-file-name "dict" pdir))
(require 'auto-complete-config)
(ac-config-default)
(setq-default ac-auto-start 1)
(setq-default ac-quick-help-delay 0.3)
(setq-default ac-sources
'(ac-source-dictionary
ac-source-filename
ac-source-words-in-all-buffer
ac-source-yasnippet))))
(:name auto-complete-clang
:post-init (lambda()
;;(add-hook 'c-mode-common-hook '(lambda()
;; (add-to-list 'ac-sources 'ac-source-clang)))
))
(:name basic-edit-toolkit :type emacswiki)
(:name cmake-mode
:post-init (lambda()
(require 'cmake-mode)
(add-to-list 'auto-mode-alist
'("CMakeLists\\.txt\\'" . cmake-mode)
'("\\.cmake\\'" . cmake-mode))))
(:name jaspace :type http
:url "http://homepage3.nifty.com/satomii/software/jaspace.el"
:post-init (lambda()
(require 'jaspace)
(global-font-lock-mode t)
(setq jaspace-alternate-jaspace-string "?")
(setq jaspace-alternate-eol-string "\n")
(setq jaspace-highlight-tabs ?^)))
(:name linum-ex :type emacswiki
:post-init (lambda()
(require 'linum-ex)
(setq linum-format "%4d|")
(global-linum-mode t)
(add-hook 'eshell-mode-hook '(lambda ()
(setq linum-mode nil)))))
(:anme linum-off :type emacswiki :features linum-off)
(:name ppindent :type emacswiki
:post-init (lambda()
(require 'ppindent)
(setq ppindent-increment 4)
(message (format "%s" (current-buffer)))
(add-hook 'c-mode-hook
(lambda() (add-hook 'before-save-hook (lambda()
(if (string-match-p "\\.[Hh][a-z]*\$" buffer-file-name)
(ppindent-h)
(ppindent-c))))))
(add-hook 'c++-mode-hook
(lambda() (add-hook 'before-save-hook (lambda()
(if (string-match-p "\\.[Hh][a-z]*\$" buffer-file-name)
(ppindent-h)
(ppindent-c))))))))
(:name session :autoloads t
:post-init (lambda()
(require 'session)
(add-hook 'after-init-hook 'session-initialize)))
(:name shadow
:type git :url "https://github.com/mooz/shadow.el.git"
:post-init (lambda()
(require 'shadow)
(add-hook 'find-file-hooks 'shadow-on-find-file)
(add-hook 'shadow-find-unshadow-hook
(lambda () (auto-revert-mode t)))))
(:name w3m-session :type emacswiki :features w3m-session)
(:name w3m-extension :type emacswiki :features w3m-extension)
))
(el-get)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(el-get-standard-packages (quote ("el-get" "package" "auto-install" "cssh" "android-mode" "anything" "auto-complete" "auto-complete-clang" "auto-complete-etags" "auto-complete-extension" "cmake-mode" "emacs-w3m" "session" "basic-edit-toolkit" "jaspace" "linum-ex" "linux-off" "ppindent" "shadow" "w3m-session" "w3m-extension" "byte-code-cache" "gist" "git-blame" "git-commit-mode" "git-emacs" "git-modeline" "gnugo" "go-mode" "magit" "magithub" "mode-compile" "multi-term" "oauth" "session" "switch-window"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment