(defconst epy-install-dir
(file-name-directory (or load-file-name
(when (boundp 'bytecomp-filename) bytecomp-filename)
buffer-file-name))
"Installation directory of python-collection"
)
(add-to-list 'load-path
(concat epy-install-dir "yasnippet"))
(add-to-list 'load-path
(concat epy-install-dir "plugins"))
(add-to-list 'load-path
(concat epy-install-dir "auto-complete"))
(add-to-list 'load-path
(concat epy-install-dir "flymake"))
(require 'yasnippet)
(yas/initialize)
(yas/load-directory (concat epy-install-dir "yasnippet/snippets"))
(setq yas/prompt-functions '(yas/ido-prompt yas/dropdown-prompt))
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories
(concat epy-install-dir "auto-complete/ac-dict"))
(ac-config-default)
(define-key ac-mode-map (kbd "M-TAB") 'auto-complete)
(setenv "PYTHONPATH"
(concat
(getenv "PYTHONPATH") ":"
(concat epy-install-dir "rope-dist")))
(when (require 'pymacs)
(setq pymacs-load-path
(list
(concat epy-install-dir "rope-dist/ropemacs/")))
(pymacs-load "ropemacs" "rope-")
(load (concat epy-install-dir "completion/ac-ropemacs-config.el"))
(add-hook 'rope-open-project-hook 'ac-nropemacs-setup)
(setq ropemacs-guess-project t)
(setq ropemacs-enable-autoimport t)
)
(global-set-key (kbd "C-x C-b") 'ibuffer)
(require 'ido)
(ido-mode t)
(setq ido-enable-flex-matching t)
(setq skeleton-pair t)
(global-set-key "(" 'skeleton-pair-insert-maybe)
(global-set-key "[" 'skeleton-pair-insert-maybe)
(global-set-key "{" 'skeleton-pair-insert-maybe)
(global-set-key "\"" 'skeleton-pair-insert-maybe)
(require 'open-next-line)
(add-hook
'eshell-mode-hook
(lambda ()
(setq
eshell-visual-commands
(append
'("mutt"
"vim"
"screen"
"lftp"
"ipython"
"telnet"
"ssh")
eshell-visual-commands))))
(require 'virtualenv)
(require 'python-flymake)
(require 'smart-operator)
(global-set-key (kbd "s-x") 'clipboard-kill-region)
(global-set-key (kbd "s-c") 'clipboard-kill-ring-save)
(global-set-key (kbd "s-v") 'clipboard-yank)
(global-set-key (kbd "M-c") 'calc-dispatch)
(define-key function-key-map [(control tab)] [?\M-\t])
(provide 'epy-init)