Got an iPhone or iPad? We have a brand new Pastebin App for both devices, and it's totally free! Click here to download the new Pastebin App for iOS.
Guest

Untitled

By: a guest on Feb 23rd, 2012  |  syntax: Lisp  |  size: 3.22 KB  |  hits: 64  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. ;;;; emacs-for-python
  2. ;;(load-file "~/.emacs.d/vendor/emacs-for-python/epy-init.el")
  3.  
  4. ;; load-path
  5. (add-to-list 'load-path "~/.emacs.d/")
  6.  
  7. ;; starter-kit
  8. (require 'package)
  9. (add-to-list 'package-archives
  10.              '("marmalade" . "http://marmalade-repo.org/packages/") t)
  11. (package-initialize)
  12.  
  13.  
  14. ;; color-theme                            
  15. (add-to-list 'load-path
  16.              "~/.emacs.d/elpa/color-theme-6.6.1")
  17.  
  18. (require 'color-theme)
  19. (load "~/.emacs.d/elpa/color-theme-blackboard-0.0.2/color-theme-blackboard.el")
  20. (color-theme-blackboard)
  21.  
  22. ;; linum
  23. (require 'linum)
  24. (global-linum-mode)
  25.  
  26. ;; auto-pair
  27. (require 'autopair)
  28. (autopair-global-mode)
  29.  
  30.  
  31. ;; autocomplete                            
  32. (add-to-list 'load-path "~/.emacs.d")
  33. (require 'auto-complete-config)
  34. (add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
  35. (ac-config-default)
  36.  
  37. (require 'auto-complete)
  38. (global-auto-complete-mode t)
  39.  
  40.  
  41. ;; yasnippets non-bundle version
  42. (add-to-list 'load-path
  43.              "~/.emacs.d/elpa/yasnippet-0.6.1")
  44.  
  45. (require 'yasnippet)
  46. (yas/initialize)
  47. (yas/load-directory "~/.emacs.d/elpa/yasnippet-0.6.1/snippets")
  48.  
  49.  
  50.  
  51. ;; pymacs
  52. (add-to-list 'load-path "~/.emacs.d/vendor/pinard-Pymacs-016b0bc")
  53.  
  54. (autoload 'pymacs-apply "pymacs")
  55. (autoload 'pymacs-call "pymacs")
  56. (autoload 'pymacs-eval "pymacs" nil t)
  57. (autoload 'pymacs-exec "pymacs" nil t)
  58. (autoload 'pymacs-load "pymacs" nil t)
  59.  
  60. ;; ropemacs
  61. (require 'pymacs)
  62. (pymacs-load "ropemacs" "rope-")
  63.  
  64. (setq ropemacs-enable-autoimport t)
  65. (setq ropemacs-enable-shortcuts nil)
  66. (setq ropemacs-local-prefix "C-c C-p")
  67.  
  68.  
  69. ;; Auto Syntax Error Hightlight
  70. (when (load "flymake" t)
  71.   (defun flymake-pyflakes-init ()
  72.     (let* ((temp-file (flymake-init-create-temp-buffer-copy
  73.                        'flymake-create-temp-inplace))
  74.            (local-file (file-relative-name
  75.                         temp-file
  76.                         (file-name-directory buffer-file-name))))
  77.       (list "pyflakes" (list local-file))))
  78.   (add-to-list 'flymake-allowed-file-name-masks
  79.                '("\\.py\\'" flymake-pyflakes-init)))
  80. (add-hook 'find-file-hook 'flymake-find-file-hook)
  81. (delete '("\\.html?\\'" flymake-xml-init) flymake-allowed-file-name-masks)
  82.  
  83. ;; windmove to switch between buffers alt + arr keys
  84. (require 'windmove)
  85. (windmove-default-keybindings 'meta)
  86. (custom-set-variables
  87.  ;; custom-set-variables was added by Custom.
  88.  ;; If you edit it by hand, you could mess it up, so be careful.
  89.  ;; Your init file should contain only one such instance.
  90.  ;; If there is more than one, they won't work right.
  91.  '(inhibit-startup-screen nil))
  92. (custom-set-faces
  93.  ;; custom-set-faces was added by Custom.
  94.  ;; If you edit it by hand, you could mess it up, so be careful.
  95.  ;; Your init file should contain only one such instance.
  96.  ;; If there is more than one, they won't work right.
  97.  )
  98.  
  99.  
  100. ;; keyboard-shortcuts for python mode
  101. ; define some keys only when the major mode html-mode is active
  102. (add-hook 'python-mode-hook
  103.  (lambda ()
  104.    (local-set-key (kbd "C-c <right>") 'rope-code-assist)
  105.    (local-set-key (kbd "C-c <C-right>") 'rope-code-assist)
  106.  )
  107. )
  108.  
  109. ;; disable flyspell for org mode
  110. (add-hook 'org-mode-hook
  111.  (lambda ()
  112.    (flyspell-mode -1)
  113.  )
  114. )
  115.  
  116. ;; enable file editing over ssh
  117. (require 'tramp)
  118. (setq tramp-default-method "ssh")