Advertisement
Guest User

.emacs file

a guest
May 15th, 2012
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 2.89 KB | None | 0 0
  1. (custom-set-variables
  2.   ;; custom-set-variables was added by Custom.
  3.   ;; If you edit it by hand, you could mess it up, so be careful.
  4.   ;; Your init file should contain only one such instance.
  5.   ;; If there is more than one, they won't work right.
  6.  '(inhibit-startup-screen t)
  7.  '(initial-buffer-choice t)
  8.  
  9.  '(initial-scratch-message nil))
  10.  
  11. '(custom-set-faces
  12.   ;; custom-set-faces was added by Custom.
  13.   ;; If you edit it by hand, you could mess it up, so be careful.
  14.   ;; Your init file should contain only one such instance.
  15.   ;; If there is more than one, they won't work right.
  16.  )
  17.  
  18. ;;; Add to emacs load path
  19. (add-to-list 'load-path “~/.emacs.d/”)
  20. (add-to-list 'load-path “~/.emacs.d/plugins/”)
  21. (add-to-list 'load-path “~/.emacs.d/plugins/autocomplete”)
  22.  
  23. ;;; Put scrollbar on the right side
  24. ;(setq scroll-bar-mode-explicit t)
  25. ;(set-scroll-bar-mode 'right)  
  26.  
  27. ;;; Integrate with MATLAB
  28. (setq load-path (cons "~/.emacs.d/elisp/matlab-emacs/" load-path))
  29. (load-library "matlab-load")
  30.  
  31. ;;; Autocompletion
  32. (add-to-list 'load-path "~/.emacs.d/plugins/autocomplete/")
  33. (require 'auto-complete-config)
  34. (add-to-list 'ac-dictionary-directories "~/.emacs.d/plugins/autocomplete//ac-dict")
  35. (ac-config-default)
  36.  
  37. ;;; Python with Emacs
  38. ;; Pymacs
  39. (autoload 'pymacs-apply "pymacs")
  40. (autoload 'pymacs-call "pymacs")
  41. (autoload 'pymacs-eval "pymacs" nil t)
  42. (autoload 'pymacs-exec "pymacs" nil t)
  43. (autoload 'pymacs-load "pymacs" nil t)
  44. ;;(eval-after-load "pymacs"
  45. ;;  '(add-to-list 'pymacs-load-path ~/.emacs.d/plugins"))
  46.  
  47. ;; ropemacs
  48. (require 'pymacs)
  49.  (pymacs-load "ropemacs" "rope-")
  50.  
  51. ;; flymake
  52. (when (load "flymake" t)
  53.      (defun flymake-pyflakes-init ()
  54.        (let* ((temp-file (flymake-init-create-temp-buffer-copy
  55.                           'flymake-create-temp-inplace))
  56.       (local-file (file-relative-name
  57.                temp-file
  58.                (file-name-directory buffer-file-name))))
  59.          (list "pyflakes" (list local-file))))
  60.  
  61.      (add-to-list 'flymake-allowed-file-name-masks
  62.           '("\\.py\\'" flymake-pyflakes-init)))
  63.  
  64. (add-hook 'find-file-hook 'flymake-find-file-hook)
  65.  
  66. ;; Adding flymake errors to minibuffer
  67. (defun my-flymake-show-help ()
  68.   (when (get-char-property (point) 'flymake-overlay)
  69.    (let ((help (get-char-property (point) 'help-echo)))
  70.     (if help (message "%s" help)))))
  71.  
  72. (add-hook 'post-command-hook 'my-flymake-show-help)
  73.  
  74. ;; Add autocomplete rope integration
  75. (ac-ropemacs-initialize)
  76. (add-hook 'python-mode-hook
  77.       (lambda ()
  78.     (add-to-list 'ac-sources 'ac-source-ropemacs)))
  79.  
  80. ;; Enable ido mode
  81. (require 'ido)
  82. (ido-mode t)
  83. (setq ido-enable-flex-matching t) ;; enable fuzzy matching
  84.  
  85. ;;; Test
  86. (setq default-frame-alist
  87.       (append default-frame-alist
  88.        '((foreground-color . "Black")
  89.  (background-color . "White")
  90.  (cursor-color . "SkyBlue")
  91.  )))
  92.  
  93. ;; Background color (test)
  94. (set-background-color "black")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement