Last active
August 29, 2015 14:08
-
-
Save micahwalter/63969864d86a8e169c5b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; fix for php-mode | |
(require 'cl) | |
;; package manager stuff | |
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") | |
("marmalade" . "http://marmalade-repo.org/packages/") | |
("melpa" . "http://melpa.milkbox.net/packages/"))) | |
(setq package-enable-at-startup nil) | |
(package-initialize) | |
;; hide menu bar | |
(menu-bar-mode -1) | |
;; whitespace | |
(require 'whitespace) | |
(setq-default indent-tabs-mode t) | |
(setq-default tab-width 8) | |
(setq-default js-indent-level 8) | |
(defvaralias 'c-basic-offset 'tab-width) | |
;; disable electric indentation (enable with C-c C-l) | |
;; (setq-default c-electric-flag nil) | |
;; indentation... | |
(require 'php-mode) | |
(setq php-mode-force-pear t) | |
(add-hook 'php-mode-hook | |
'(lambda () | |
(setq indent-tabs-mode t) | |
(setq tab-width 4) | |
(setq c-basic-offset 4) | |
;; allow one tab after <?php | |
(c-set-offset 'topmost-intro 4) | |
(c-set-offset 'cpp-macro -4))) | |
(add-hook 'smarty-mode-hook | |
'(lambda() | |
(local-set-key (kbd "TAB") 'self-insert-command); | |
(setq indent-tabs-mode t) | |
(setq tab-width 4) | |
(setq c-basic-offset 4))) | |
;; force tab to always insert one tab | |
;; smarty mode for .txt files | |
(setq auto-mode-alist | |
(append | |
'(("\\.txt$" . smarty-mode)) | |
auto-mode-alist)) | |
(show-paren-mode 1) ; turn on paren match highlighting | |
;; linum | |
(global-linum-mode 1) | |
(setq linum-format "%4d \u2502 ") | |
;; smyx wtf | |
;; https://stackoverflow.com/questions/11127109/emacs-24-package-system-initialization-problems/11140619#11140619 | |
;;(defun init-smyx() | |
;; (load-theme 'smyx) | |
;;) | |
;;(add-hook 'after-init-hook 'init-smyx) | |
;; ops-ubuntu .emacs file | |
(setq inhibit-startup-message t) | |
(setq-default fill-column 80) | |
(setq-default tab-width 8) | |
(setq require-final-newline nil) | |
(setq next-line-add-newlines nil) | |
(setq backup-before-writing t) | |
(setq delete-auto-save-files t) | |
(setq display-time-day-and-date t) | |
(setq display-time-24hr-format t) | |
(display-time) | |
(define-key esc-map "r" 'query-replace) | |
(define-key esc-map "%" 'query-replace-regexp) | |
(define-key ctl-x-map "\^l" 'goto-line) | |
(define-key ctl-x-map "l" 'goto-line) | |
;; end ops-ubuntu .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. | |
'(custom-safe-themes | |
(quote | |
("132ccc75b7fdcd9f5979329620a1151953a8f65efad06b988deed7cba9338eab" "46223bc978f9e7ab7f5b61d171da7ce98e69661158b75ed011603d3134fbad02" default)))) | |
(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. | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment