Advertisement
abasar

Emacs 2

Sep 17th, 2016
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1. ;; init.el --- Emacs configuration
  2.  
  3. ;; INSTALL PACKAGES
  4. ;; --------------------------------------
  5.  
  6. (require 'package)
  7.  
  8. (add-to-list 'package-archives
  9. '("melpa" . "http://melpa.org/packages/") t)
  10.  
  11. (package-initialize)
  12. (when (not package-archive-contents)
  13. (package-refresh-contents))
  14.  
  15. (defvar myPackages
  16. '(material-theme
  17. evil
  18. evil-leader
  19. helm
  20. elpy
  21. flycheck
  22. py-autopep8
  23. powerline
  24. ivy
  25. counsel
  26. company-jedi
  27. org-bullets))
  28. ;; ox-pandoc))
  29.  
  30. (mapc #'(lambda (package)
  31. (unless (package-installed-p package)
  32. (package-install package)))
  33. myPackages)
  34.  
  35. ;; BASIC CUSTOMIZATION
  36. ;; --------------------------------------
  37. (add-to-list 'exec-path "C:\\Python27")
  38. (add-to-list 'exec-path "C:\\Python27\\Scripts")
  39. (add-to-list 'exec-path "C:\\Python27\\Lib")
  40.  
  41. (define-key global-map "\C-ca" 'org-agenda)
  42. (define-key global-map "\C-cl" 'org-store-link)
  43. (setq org-log-done 'time)
  44.  
  45. (require 'org-bullets)
  46. (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
  47.  
  48. (ivy-mode 1)
  49.  
  50. ;; (add-hook 'markdown-mode-hook 'pandoc-mode)
  51.  
  52. (require 'elpy)
  53. (elpy-enable)
  54. (when (require 'flycheck nil t)
  55. (setq elpy-modules (delq 'elpy-module-flymake elpy-modules))
  56. (add-hook 'elpy-mode-hook 'flycheck-mode))
  57.  
  58. (defun my/python-mode-hook ()
  59. (add-to-list 'company-backends 'company-jedi))
  60. (add-hook 'python-mode-hook 'my/python-mode-hook)
  61. ;; (add-hook 'python-mode-hook 'jedi:setup)
  62. ;; (setq jedi:complete-on-dot t)
  63.  
  64. (add-hook 'python-mode-hook 'my/python-mode-hook)
  65.  
  66. (setq elpy-syntax-command "python -m flake8")
  67.  
  68.  
  69. (require 'py-autopep8)
  70. (add-hook 'elpy-mode-hook 'py-autopep8-enable-on-save)
  71.  
  72. (require 'helm-config)
  73.  
  74. (global-flycheck-mode)
  75.  
  76. (require 'evil-leader)
  77. (global-evil-leader-mode)
  78.  
  79. (require 'evil)
  80. (evil-mode 1)
  81.  
  82. (evil-leader/set-leader "<SPC>")
  83.  
  84. (evil-leader/set-key
  85. "x" 'counsel-M-x
  86. "f f" 'counsel-find-file
  87. "f s" 'save-buffer)
  88.  
  89. (require 'powerline)
  90. (powerline-default-theme)
  91.  
  92. (setq inhibit-startup-message t) ;; hide the startup message
  93. (load-theme 'material t) ;; load material theme
  94. (global-linum-mode t) ;; enable line numbers globally
  95.  
  96. ;; init.el ends here
  97. (custom-set-variables
  98. ;; custom-set-variables was added by Custom.
  99. ;; If you edit it by hand, you could mess it up, so be careful.
  100. ;; Your init file should contain only one such instance.
  101. ;; If there is more than one, they won't work right.
  102. '(org-agenda-custom-commands
  103. (quote
  104. (("n" "Agenda and all TODOs"
  105. ((agenda "" nil)
  106. (alltodo "" nil))
  107. nil)
  108. ("i" "A sorted expanded agenda view"
  109. ((agenda ""
  110. ((org-agenda-overriding-header "Calendar")))
  111. (tags "URGENT"
  112. ((org-agenda-overriding-header "Urgent Stuff")))
  113. (todo "NEXT"
  114. ((org-agenda-overriding-header "All NEXT Actions")))
  115. (alltodo ""
  116. ((org-agenda-overriding-header "TODO list"))))
  117. nil nil))))
  118. '(org-agenda-files (quote ("c:/org/index.org")))
  119. '(package-selected-packages
  120. (quote
  121. (ox-pandoc org-pandoc pandoc pandoc-mode elpy material-theme helm evil-leader))))
  122. (custom-set-faces
  123. ;; custom-set-faces was added by Custom.
  124. ;; If you edit it by hand, you could mess it up, so be careful.
  125. ;; Your init file should contain only one such instance.
  126. ;; If there is more than one, they won't work right.
  127. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement