SHARE
TWEET

Untitled

a guest Jun 12th, 2013 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (add-to-list 'load-path "~/.emacs.d/")
  2. (add-to-list 'load-path "~/.emacs.d/solarized/")
  3. (add-to-list 'load-path "~/.emacs.d/auto-complete/")
  4. (add-to-list 'custom-theme-load-path "~/.emacs.d/solarized")
  5. ;(load-theme 'solarized-light t)
  6.  
  7. (require 'package)
  8. (add-to-list 'package-archives
  9.              '("marmalade" . "http://marmalade-repo.org/packages/"))
  10. (package-initialize)
  11.  
  12. (set-face-attribute 'default nil :height 120)
  13.  
  14. (setq visible-bell 1)
  15. (tool-bar-mode -1)
  16.  
  17. (require 'ido)
  18. (ido-mode 1)
  19. (setq ido-enable-last-directory-history t)
  20. (setq ido-enable-flex-matching t)
  21. (global-set-key (kbd "M-f") 'ido-find-file)
  22.  
  23.  
  24. ;;;;;;;;;;;;
  25. ;;; keys ;;;
  26. ;;;;;;;;;;;;
  27.  
  28. (cua-mode t)
  29.  
  30. (require 'redo)
  31. (global-set-key (kbd "C-S-z") 'redo)
  32. (global-set-key (kbd "C-s") 'save-buffer)
  33. (global-set-key (kbd "C-S-s") 'write-file)
  34. (global-set-key (kbd "C-s") 'save-buffer)
  35. (global-set-key (kbd "C-S-s") 'write-file)
  36. (global-set-key (kbd "C-w") 'kill-buffer)
  37. (global-set-key (kbd "C-a") 'mark-whole-buffer)
  38. (global-set-key (kbd "C-o") 'find-file)
  39. (global-set-key (kbd "C-S-<tab>") 'previous-buffer)
  40. (global-set-key (kbd "C-<tab>") 'next-buffer)
  41. (global-set-key (kbd "C-p") 'execute-extended-command)
  42.  
  43. ;; isearch stuff
  44. (global-set-key (kbd "C-f") 'isearch-forward)
  45. (global-set-key (kbd "C-S-f") 'isearch-backward)
  46. (add-hook 'isearch-mode-hook
  47.           (lambda ()
  48.             (define-key isearch-mode-map (kbd "C-f") 'isearch-repeat-forward)
  49.             (define-key isearch-mode-map (kbd "C-S-f") 'isearch-repeat-backward)))
  50.  
  51. (global-set-key (kbd "C-h") 'query-replace)
  52.  
  53. ;;;;;;;;;;;;;;;;;;;;;
  54. ;;; auto-complete ;;;
  55. ;;;;;;;;;;;;;;;;;;;;;
  56.  
  57. (require 'auto-complete-config)
  58. (add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
  59. (setq ac-delay 0.0)
  60. (setq ac-use-quick-help t)
  61. (setq ac-quick-help-delay 0.05)
  62. (setq ac-use-fuzzy 1)
  63. (setq ac-auto-start 1)
  64. (setq ac-auto-show-menu 1)
  65. (ac-config-default)
  66.  
  67. (define-key ac-mode-map (kbd "C-SPC") 'auto-complete)
  68.  
  69. ; TODO: сделать пэйдж ап и даун
  70. ;(add-hook 'auto-complete-mode-hook
  71. ;         (lambda ()
  72. ;           (define-key ac-mode-map (kbd "<next>") '
  73.  
  74. ;;;;;;;;;;;;;;;;;;;
  75. ;;; auto-indent ;;;
  76. ;;;;;;;;;;;;;;;;;;;
  77.  
  78. (global-set-key (kbd "RET") 'newline-and-indent)
  79.  
  80. ;;;;;;;;;;;;;;
  81. ;;; slime  ;;;
  82. ;;;;;;;;;;;;;;
  83.  
  84. ;; (setq inferior-lisp-program "C:/home/bin/clisp/full/lisp.exe
  85. ;; -B C:/home/bin/clisp/full
  86. ;; -M C:/home/bin/clisp/full/lispinit.mem
  87. ;; -ansi -q")
  88. ;; (setq lisp-indent-function 'common-lisp-indent-function
  89. ;;       slime-complete-symbol-function 'slime-fuzzy-complete-symbol)
  90.  
  91. ;; (add-to-list 'load-path "C:/home/bin/emacs/site-lisp/slime/")
  92. ;; (add-to-list 'load-path "c:/home/bin/emacs/site-lisp/slime/contrib")
  93. ;; (require 'slime)
  94. ;; (require 'slime-autoloads)
  95. ;; (require 'slime-fuzzy)
  96. ;; (slime-setup '(slime-fancy))
  97.  
  98. ;; (require 'ac-slime)
  99.  
  100. ;; (add-hook 'slime-mode-hook 'set-up-slime-ac)
  101. ;; (add-hook 'slime-repl-mode-hook 'set-up-slime-ac)
  102. ;; (add-to-list 'ac-modes 'slime-repl-mode)
  103. ;; (add-to-list 'ac-modes 'lisp-mode)
  104.  
  105. ;;;;;;;;;;;;;;;
  106. ;;; clojure ;;;
  107. ;;;;;;;;;;;;;;;
  108.  
  109. (require 'nrepl)
  110.  
  111. ;; Configure nrepl.el
  112. (setq nrepl-hide-special-buffers t)
  113. (setq nrepl-popup-stacktraces-in-repl t)
  114. (setq nrepl-history-file "~/.emacs.d/nrepl-history")
  115.  
  116. ;; Some default eldoc facilities
  117. (add-hook 'nrepl-connected-hook
  118.           (defun pnh-clojure-mode-eldoc-hook ()
  119.             (add-hook 'clojure-mode-hook 'turn-on-eldoc-mode)
  120.             (add-hook 'nrepl-interaction-mode-hook 'nrepl-turn-on-eldoc-mode)
  121.             (nrepl-enable-on-existing-clojure-buffers)))
  122.  
  123. ;; Repl mode hook
  124. (add-hook 'nrepl-mode-hook 'subword-mode)
  125.  
  126. ;; Auto completion for NREPL
  127. (require 'ac-nrepl)
  128. (eval-after-load "auto-complete"
  129.   '(add-to-list 'ac-modes 'nrepl-mode))
  130.  
  131. (add-hook 'nrepl-mode-hook 'ac-nrepl-setup)
  132.  
  133. (eval-after-load 'clojure-mode
  134.   '(define-key clojure-mode-map (kbd "C-<ret>") 'nrepl-eval-expression-at-point))
  135.  
  136. (global-set-key (kbd "C-<ret>") 'nrepl-eval-expression-at-point)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top