Skip to content

Instantly share code, notes, and snippets.

@MichaelDrogalis
Created June 8, 2012 13:35
Show Gist options
  • Save MichaelDrogalis/2895639 to your computer and use it in GitHub Desktop.
Save MichaelDrogalis/2895639 to your computer and use it in GitHub Desktop.
;; .emacs
;;; uncomment this line to disable loading of "default.el" at startup
;; (setq inhibit-default-init t)
;; turn on font-lock mode
(when (fboundp 'global-font-lock-mode)
(global-font-lock-mode t))
;; enable visual feedback on selections
;(setq transient-mark-mode t)
;; default to better frame titles
(setq frame-title-format
(concat "%b - emacs@" (system-name)))
;; default to unified diffs
(setq diff-switches "-u")
;; always end a file with a newline
;(setq require-final-newline 'query)
;;; This was installed by package-install.el.
;;; This provides support for the package system and
;;; interfacing with ELPA, the package archive.
;;; Move this code earlier if you want to reference
;;; packages in your .emacs.
(when
(load
(expand-file-name "~/.emacs.d/elpa/package.el"))
(package-initialize))
(global-linum-mode 1)
(add-to-list 'load-path "~/.emacs.d")
(require 'php-mode)
(require 'igrep)
(require 'ifind)
(require 'project-local-variables)
(require 'find-file-in-project)
(setq auto-mode-alist
(append '(("\.php$" . php-mode)
("\.module$" . php-mode))
auto-mode-alist))
(setq-default indent-tabs-mode nil)
;;; Window movement keys.
(global-set-key (kbd "M-<left>") 'windmove-left)
(global-set-key (kbd "M-<right>") 'windmove-right)
(global-set-key (kbd "M-<up>") 'windmove-up)
(global-set-key (kbd "M-<down>") 'windmove-down)
(global-set-key (kbd "C-c h") 'hippie-expand)
(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.
'(cua-mode t nil (cua-base))
'(tool-bar-mode nil nil (tool-bar)))
(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.
)
(define-key global-map "\C-x\C-a" "\C-a\C-k")
(global-linum-mode t)
;; Don't show the startup screen
(setq inhibit-startup-message t)
;; "y or n" instead of "yes or no"
(fset 'yes-or-no-p 'y-or-n-p)
;; Highlight regions and add special behaviors to regions.
;; "C-h d transient" for more info
(setq transient-mark-mode t)
;; Display line and column numbers
(setq line-number-mode t)
(setq column-number-mode t)
;; Modeline info
(display-time-mode 1)
;; (display-battery-mode 1)
;; Small fringes
(set-fringe-mode '(1 . 1))
;; Prevent the annoying beep on errors
(setq visible-bell t)
;; Gotta see matching parens
(show-paren-mode t)
;; Don't truncate lines
(setq truncate-lines t)
(setq truncate-partial-width-windows nil)
(setq show-trailing-whitespace t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment