Skip to content

Instantly share code, notes, and snippets.

@siscia
Created March 5, 2013 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siscia/5093718 to your computer and use it in GitHub Desktop.
Save siscia/5093718 to your computer and use it in GitHub Desktop.
(require 'package)
(add-to-list 'package-archives
'("marmalade" .
"http://marmalade-repo.org/packages/"))
(package-initialize)
(add-to-list 'load-path "~/.emacs.d/")
;;(require 'auto-complete-config)
;;(add-to-list 'ac-dictionary-directories "~/.emacs.d//ac-dict")
;;(ac-config-default)
;; Color Theme
;;(require 'color-theme)
;;(color-theme-dark-laptop)
(defun volatile-kill-buffer ()
"Kill current buffer unconditionally."
(interactive)
(let ((buffer-modified-p nil))
(kill-buffer (current-buffer))))
(global-set-key (kbd "C-x q") 'volatile-kill-buffer) ;; Unconditionally kill unmodified buffers.
;;goto-line
(global-set-key "\C-l" 'goto-line)
;; To save file in another directory that does not exist yet
(add-hook 'before-save-hook
(lambda ()
(when buffer-file-name
(let ((dir (file-name-directory buffer-file-name)))
(when (and (not (file-exists-p dir))
(y-or-n-p (format "Directory %s does not exist. Create it?" dir)))
(make-directory dir t))))))
;;;;;;;; PYTHON STUFF ;;;;;;;;;;;;;;;;,
(load-file ".emacs.d/emacs-for-python/epy-init.el")
(add-to-list 'load-path ".emacs.d/emacs-for-python/") ;; tell where to load the various files
(require 'epy-setup) ;; It will setup other loads, it is required!
(require 'epy-python) ;; If you want the python facilities [optional]
(require 'epy-completion) ;; If you want the autocompletion settings [optional]
(require 'epy-editing) ;; For configurations related to editing [optional]
(require 'epy-bindings) ;; For my suggested keybindings [optional]
(require 'epy-nose) ;; For nose integration
;;(put 'ido-exit-minibuffer 'disabled nil)
(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.
'(ansi-color-names-vector ["black" "#d55e00" "#009e73" "#f8ec59" "#0072b2" "#cc79a7" "#56b4e9" "white"])
'(custom-enabled-themes (quote (manoj-dark))))
(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.
)
;;;;;;;;;; CLOJURE STUFF ;;;;;;;;;;;;;
;; add paredit to clojure-mode
(add-hook 'clojure-mode-hook 'paredit-mode)
;; block buffer from nrepl to appear
(setq nrepl-hide-special-buffers t)
;; add paredit to nrepl
(add-hook 'nrepl-mode-hook 'paredit-mode)
;; add rainbow parentheses
;(add-hook 'nrepl-mode-hook 'rainbow-delimiters-mode)
;; stop buffer error to pop up
;(setq nrepl-popup-stacktraces nil)
;;idention automatic
(add-hook 'clojure-mode-hook '(lambda ()
(local-set-key (kbd "RET") 'newline-and-indent)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment