Skip to content

Instantly share code, notes, and snippets.

@timani
Created December 14, 2011 02:27
Show Gist options
  • Save timani/1474970 to your computer and use it in GitHub Desktop.
Save timani/1474970 to your computer and use it in GitHub Desktop.
The best .emacs file
(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.
'(android-mode-sdk-dir "~/Library/android/android-sdk-linux_x86")
'(confirm-kill-emacs (quote y-or-n-p))
'(cua-mode t nil (cua-base))
'(ecb-options-version "2.40")
'(ecb-source-path (quote (("/" "/") "/home/timani/httpdocs")))
'(face-font-family-alternatives (quote (("undutom" "fixed") ("monospace" "helv" "helvetica" "arial" "fixed"))))
'(frame-background-mode (quote dark))
'(inhibit-startup-screen t))
(add-to-list 'load-path "~/.emacs.d/plugins")
(require 'android-mode)
(require 'linum)
(global-linum-mode 1)
(require 'autocompletion-php-functions)
(global-auto-complete-mode t)
(add-to-list 'load-path "~/.emacs.d/plugins/git-emacs")
(require 'git-emacs)
(add-to-list 'load-path "~/.emacs.d/plugins/cedet-1.0pre7/common")
(require 'cedet)
(add-to-list 'load-path "~/.emacs.d/plugins/ecb-2.40")
(require 'ecb)
(require 'w3m-load)
(add-to-list 'load-path "~/.emacs.d/plugins/color-theme-6.6.0")
(require 'color-theme)
(color-theme-initialize)
(color-theme-comidia)
;;(set-frame-parameter (selected-frame) 'alpha '(<active> [<inactive>]))
(set-frame-parameter (selected-frame) 'alpha '(85 50))
(add-to-list 'default-frame-alist '(alpha 85 50))
(eval-when-compile (require 'cl))
(defun toggle-transparency ()
(interactive)
(if (/=
(cadr (frame-parameter nil 'alpha))
100)
(set-frame-parameter nil 'alpha '(100 100))
(set-frame-parameter nil 'alpha '(85 50))))
(global-set-key (kbd "C-c t") 'toggle-transparency)
;; Edit Drupal files in php-mode
(require 'php-mode)
(add-to-list 'auto-mode-alist '("/home/timani/.*\.\(php\|module\|inc\|test\|install\)$" . php-mode))
(add-to-list 'auto-mode-alist '("/home/timani.*\.module" . php-mode))
(add-to-list 'auto-mode-alist '("/home/timani.*\.tpl" . php-mode))
(add-to-list 'auto-mode-alist '("/home/timani.*\.inc" . php-mode))
(add-to-list 'auto-mode-alist '("/home/timani.*\.phtml" . php-mode))
(add-to-list 'load-path
"~/.emacs.d/plugins/yasnippet-0.6.1c")
(require 'yasnippet) ;; not yasnippet-bundle
(yas/initialize)
(yas/load-directory "~/.emacs.d/plugins/yasnippet-0.6.1c/snippets")
(custom-set-faces
;; custom-set-faces 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.
'(default ((t (:inherit nil :stipple nil :background "black" :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 98 :width normal :foundry "unknown" :family "UnDotum"))))
'(custom-rogue ((((class color)) (:background "black" :foreground "red")))))
;; I will edit my own settings, thank you very much - Timani
;; ========= Set colours ==========
;; Set cursor and mouse-pointer colours
(set-foreground-color "white")
;; Set emacs background colour
(set-background-color "black")
;; The font size is also unsually large
;;(set-default-font "8*13")
(setq x-select-enable-clipboard t)
(cua-mode t)
(transient-mark-mode 1) ;; No region when it is not highlighted
(setq cua-keep-region-after-copy t) ;; Standard Windows behaviour
;; DISABLE COPY ON HIGHLIGHT!!!
(setq mouse-drag-copy-region nil)
;; The window is also unusually small @ startup
(setq default-frame-alist
'((top . 200) (left . 400)
(cursor-color . "white")
(cursor-type . box)
(width . 160) (height . 45)
))
(setq initial-frame-alist '((top . 10) (left . 30)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment