;;;; emacs-for-python
;;(load-file "~/.emacs.d/vendor/emacs-for-python/epy-init.el")
;; load-path
(add-to-list 'load-path "~/.emacs.d/")
;; starter-kit
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(package-initialize)
;; color-theme
(add-to-list 'load-path
"~/.emacs.d/elpa/color-theme-6.6.1")
(require 'color-theme)
(load "~/.emacs.d/elpa/color-theme-blackboard-0.0.2/color-theme-blackboard.el")
(color-theme-blackboard)
;; linum
(require 'linum)
(global-linum-mode)
;; auto-pair
(require 'autopair)
(autopair-global-mode)
;; autocomplete
(add-to-list 'load-path "~/.emacs.d")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(ac-config-default)
(require 'auto-complete)
(global-auto-complete-mode t)
;; yasnippets non-bundle version
(add-to-list 'load-path
"~/.emacs.d/elpa/yasnippet-0.6.1")
(require 'yasnippet)
(yas/initialize)
(yas/load-directory "~/.emacs.d/elpa/yasnippet-0.6.1/snippets")
;; pymacs
(add-to-list 'load-path "~/.emacs.d/vendor/pinard-Pymacs-016b0bc")
(autoload 'pymacs-apply "pymacs")
(autoload 'pymacs-call "pymacs")
(autoload 'pymacs-eval "pymacs" nil t)
(autoload 'pymacs-exec "pymacs" nil t)
(autoload 'pymacs-load "pymacs" nil t)
;; ropemacs
(require 'pymacs)
(pymacs-load "ropemacs" "rope-")
(setq ropemacs-enable-autoimport t)
(setq ropemacs-enable-shortcuts nil)
(setq ropemacs-local-prefix "C-c C-p")
;; Auto Syntax Error Hightlight
(when (load "flymake" t)
(defun flymake-pyflakes-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
(list "pyflakes" (list local-file))))
(add-to-list 'flymake-allowed-file-name-masks
'("\\.py\\'" flymake-pyflakes-init)))
(add-hook 'find-file-hook 'flymake-find-file-hook)
(delete '("\\.html?\\'" flymake-xml-init) flymake-allowed-file-name-masks)
;; windmove to switch between buffers alt + arr keys
(require 'windmove)
(windmove-default-keybindings 'meta)
(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.
'(inhibit-startup-screen nil))
(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.
)
;; keyboard-shortcuts for python mode
; define some keys only when the major mode html-mode is active
(add-hook 'python-mode-hook
(lambda ()
(local-set-key (kbd "C-c <right>") 'rope-code-assist)
(local-set-key (kbd "C-c <C-right>") 'rope-code-assist)
)
)
;; disable flyspell for org mode
(add-hook 'org-mode-hook
(lambda ()
(flyspell-mode -1)
)
)
;; enable file editing over ssh
(require 'tramp)
(setq tramp-default-method "ssh")