Created
August 15, 2011 00:24
-
-
Save saikat/1145503 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(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)) | |
'(pop-up-frames nil) | |
'(transient-mark-mode t)) | |
(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. | |
) | |
;; (load "/Applications/nxhtml/autostart.el") | |
;; possibly controversial as a global default, but shipping a lisp | |
;; that dies trying to talk to slime is stupid, so: | |
(set-language-environment "UTF-8") | |
;;(setq slime-net-coding-system 'utf-8-unix) | |
;; load slime: | |
;;(setq load-path (cons "/Users/saikat/Development/Source/clbuild/source/slime" load-path)) | |
;;(setq load-path (cons "/Users/saikat/Development/Source/clbuild/source/slime/contrib" load-path)) | |
;;(setq slime-backend "/Users/saikat/Development/Source/clbuild/.swank-loader.lisp") | |
;;(setq inhibit-splash-screen t) | |
;;(load "/Users/saikat/Development/Source/clbuild/source/slime/slime") | |
;;(setq inferior-lisp-program "/Users/saikat/Development/Source/clbuild/clbuild --implementation sbcl lisp") | |
;;(slime-setup '(slime-fancy slime-tramp slime-asdf)) | |
;;(slime) | |
;; Emacs backup files | |
(setq backup-directory-alist `(("." . "~/.emacs_backup"))) | |
(setq backup-by-copying t) | |
(setq delete-old-versions t | |
kept-new-versions 6 | |
kept-old-versions 2 | |
version-control t) | |
;; Javascript mode | |
;; (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode)) | |
;; (autoload 'javascript-mode "javascript" nil t) | |
;; Objective-j stuff | |
(require 'objj-mode) | |
(add-to-list 'auto-mode-alist '("\\.j\\'" . objj-mode)) | |
(require 'espresso) | |
(add-to-list 'auto-mode-alist '("\\.js\\'" . espresso-mode)) | |
;; org-mode | |
;; The following lines are always needed. Choose your own keys. | |
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) | |
(global-set-key "\C-cl" 'org-store-link) | |
(global-set-key "\C-ca" 'org-agenda) | |
(global-set-key "\C-cb" 'org-iswitchb) | |
(global-font-lock-mode 1) ; for all buffers | |
(setq org-log-done 'time) | |
(setq org-startup-folded 'content) | |
(setq org-hide-leading-stars t) | |
(setq org-agenda-ndays 1) | |
(setq org-todo-keywords | |
'((sequence "TODO" "NEXT" "|" "DONE"))) | |
;; Key rebindings to make things more efficient | |
(global-set-key "\C-x\C-m" 'execute-extended-command) | |
(global-set-key "\C-xm" 'execute-extended-command) | |
(global-set-key "\C-t" 'other-frame) | |
(global-set-key "\C-o" 'other-window) | |
(global-set-key "\C-xo" 'mode-line-other-buffer) | |
;; ido setup | |
;; (require 'ido) | |
;; (ido-mode t) | |
;; (setq ido-enable-flex-matching t) | |
;; (setq ido-create-new-buffer 'always) | |
;;anything setup | |
;;(require 'anything-config) | |
;;(require 'anything-match-plugin) | |
;;(global-set-key "\C-u" 'anything) | |
;;(global-set-key "\C-c\C-u" 'universal-argument) | |
;;(setq anything-sources '(anything-c-source-buffers+ | |
;; anything-c-source-files-in-current-dir | |
;; anything-weblocks-saikat-c-source-file-search | |
;;anything-contentrees-c-source-file-search | |
;;anything-weblocks-contentrees-c-source-file-search | |
;; anything-c-source-locate | |
;; anything-c-source-recentf | |
;; proel-anything-projects | |
;; anything-c-source-org-headline | |
;; anything-c-source-buffer-not-found)) | |
;; icicles setup | |
;;(setq load-path (cons "/Users/saikat/Development/Source/icicles" load-path)) | |
;;(require 'icicles nil t) | |
;; grep+ setup | |
(require 'grep+) | |
;; proel setup | |
(require 'proel) | |
(grep-compute-defaults) | |
(global-set-key "\C-c\C-g" 'proel-grep-in-project) | |
;; org-mode setup | |
(setq org-agenda-files '("/Users/saikat/Documents/Lists/todo lists")) | |
;; paredit setup | |
;;(autoload 'paredit-mode "paredit" | |
;; "Minor mode for pseudo-structurally editing Lisp code." | |
;; t) | |
;;(mapc (lambda (mode) | |
;; (let ((hook (intern (concat (symbol-name mode) | |
;; "-mode-hook")))) | |
;; (add-hook hook (lambda () (paredit-mode +1))))) | |
;; '(emacs-lisp lisp inferior-lisp slime slime-repl javascript)) | |
;; Get rid of toolbar in carbon emacs | |
(tool-bar-mode nil) | |
;; Show line and column numbers | |
(setq line-number-mode t) | |
(setq column-number-mode t) | |
;; Show paretheses highlighting by default | |
(show-paren-mode t) | |
;; New frames use this size | |
(setq default-frame-alist '((top . 1) (left . 1450) (width . 80) (height . 53))) | |
(setq initial-frame-alist '((top . 1) (left . 1) (width . 80) (height . 53))) | |
;; Get rid of scroll bars | |
(scroll-bar-mode 0) | |
;; Lisp editing mode key rebindings | |
;;(define-key slime-mode-map (kbd "C-k") 'kill-sexp) | |
;; (define-key slime-mode-map (kbd "C-w") 'backward-kill-sexp) | |
;; (define-key slime-mode-map (kbd "C-M-k") 'kill-line) | |
;; (define-key slime-mode-map (kbd "C-M-w") 'backward-kill-word) | |
;; redshank setup | |
;; (require 'redshank-loader) | |
;; (eval-after-load "redshank-loader" | |
;; `(redshank-setup '(lisp-mode-hook | |
;; slime-repl-mode-hook) t)) | |
;; Setup color theme | |
(setq load-path (cons "/Users/saikat/Development/Source/emacs-color-theme" load-path)) | |
(require 'color-theme) | |
(eval-after-load "color-theme" | |
'(progn | |
(color-theme-initialize) | |
(color-theme-clarity))) | |
;; Allow toggling fullscreen | |
(defun fullscreen () | |
"toggles whether the currently selected frame consumes the entire display or is decorated with a window border" | |
(interactive) | |
(let ((f (selected-frame))) | |
(modify-frame-parameters f `((fullscreen . ,(if (eq nil (frame-parameter f 'fullscreen)) 'fullboth nil)))))) | |
;; rcirc | |
(require 'rcirc) | |
(setq rcirc-default-nick "saikat" | |
rcirc-time-format "%R " | |
rcirc-buffer-maximum-lines 1000 | |
rcirc-authinfo '(("freenode" nickserv "saikat" "cNnUCuUc0YzqqydY8hQp")) | |
rcirc-startup-channels-alist '(("oftc" "#linode") | |
("freenode" "#cappuccino" "#mockingbird" "#bitbucket" "#node.js" "#redis") | |
("prison" "#gamemusic"))) | |
;; Make my own nickname red | |
(set-face-foreground 'rcirc-my-nick "red" nil) | |
; Always keep the prompt at the bottom of the buffer | |
(add-hook 'rcirc-mode-hook | |
'(lambda () | |
(set (make-local-variable 'scroll-conservatively) 8192))) | |
; Wrap long lines according to the width of the window | |
(add-hook 'window-configuration-change-hook | |
'(lambda () | |
(setq rcirc-fill-column (- (window-width) 2)))) | |
(defun rcirc-kill-all-buffers () | |
(interactive) | |
(kill-all-mode-buffers 'rcirc-mode)) | |
(defun start-cruise () | |
(interactive) | |
(shell-command "/Library/StartupItems/CruiseControl/cruise_control start")) | |
(defun stop-cruise () | |
(interactive) | |
(shell-command "/Library/StartupItems/CruiseControl/cruise_control stop")) | |
(defun irc () | |
(interactive) | |
(rcirc-connect "irc.oftc.net" 6667 rcirc-default-nick rcirc-default-nick rcirc-default-nick (assoc "oftc" rcirc-startup-channels-alist)) | |
(rcirc-connect "irc.freenode.net" 6667 rcirc-default-nick rcirc-default-nick rcirc-default-nick (assoc "freenode" rcirc-startup-channels-alist)) | |
(rcirc-connect "irc.prison.net" 6667 rcirc-default-nick rcirc-default-nick "Tassadar" (assoc "prison" rcirc-startup-channels-alist))) | |
(eval-after-load 'rcirc '(require 'rcirc-notify)) | |
(defun occur-irc (regexp) | |
"Run `multi-occur' for all buffers in `rcirc-mode'." | |
(interactive "sList lines matching regexp: ") | |
(multi-occur (let (result) | |
(dolist (buf (buffer-list)) | |
(with-current-buffer buf | |
(when (eq major-mode 'rcirc-mode) | |
(setq result (cons buf result))))) | |
result) regexp)) | |
(require 'zenburn) | |
(zenburn) | |
(add-to-list 'load-path "~/.emacs.d/vendor/coffee-mode") | |
(require 'coffee-mode) | |
(add-to-list 'auto-mode-alist '("\\.coffee$" . coffee-mode)) | |
(add-to-list 'auto-mode-alist '("Cakefile" . coffee-mode)) | |
(setq-default tab-width 2) | |
(defun coffee-custom () | |
"coffee-mode-hook" | |
(setq coffee-command "~/node_modules/.bin/coffee") | |
(define-key coffee-mode-map [(meta r)] 'coffee-compile-buffer) | |
(set (make-local-variable 'tab-width) 2)) | |
(add-hook 'coffee-mode-hook | |
'(lambda() (coffee-custom))) | |
(require 'carbon-font) | |
(fixed-width-set-default-fontset | |
"-apple-consolas-medium-r-normal--14-*-*-*-*-*-iso10646-1") | |
(split-window-horizontally) | |
(fullscreen) | |
(make-frame-command) | |
(other-frame 1) | |
(split-window-horizontally) | |
(fullscreen) | |
;;(irc) | |
(setq-default indent-tabs-mode nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment