aboutsummaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d
diff options
context:
space:
mode:
authorGravatar Tom Willemse2018-07-09 19:04:15 -0700
committerGravatar Tom Willemse2018-07-09 19:04:15 -0700
commit230ae96d4086791170589d6ea21351c9c436f146 (patch)
tree1dbd260b330006cf5f3c853baec2b53c6068b955 /emacs/.emacs.d
parent4cf35095ff2011825d2f51714d96564a7ff950b5 (diff)
downloadnew-dotfiles-230ae96d4086791170589d6ea21351c9c436f146.tar.gz
new-dotfiles-230ae96d4086791170589d6ea21351c9c436f146.zip
Move python config to separate file
Diffstat (limited to 'emacs/.emacs.d')
-rw-r--r--emacs/.emacs.d/init.el11
-rwxr-xr-xemacs/.emacs.d/init/oni-python-init.el34
2 files changed, 37 insertions, 8 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el
index f9f49dd..542c516 100644
--- a/emacs/.emacs.d/init.el
+++ b/emacs/.emacs.d/init.el
@@ -84,14 +84,11 @@
(setq auto-save-list-file-prefix (oni:data-location "auto-save-list/.saves-"))
(global-set-key (kbd "C-M-SPC") 'er/expand-region)
-
(global-set-key (kbd "M-+") 'mc/mark-next-like-this)
-
(global-set-key (kbd "C-c (") 'embrace-commander)
-
(global-set-key (kbd "C-c o") 'oni-hydra-org/body)
-
(global-set-key (kbd "C-c m") 'oni-hydra-magit/body)
+(global-set-key (kbd "C-x f") 'ffap)
(require 'destroy-trailing-whitespace)
(global-destroy-trailing-whitespace-mode)
@@ -305,6 +302,8 @@
(with-eval-after-load 'cc-mode (load "oni-java-init"))
+(with-eval-after-load 'python-mode (load "oni-python-init"))
+
(add-hook 'ielm-mode-hook 'paredit-mode)
(autoload 'mbsync-conf-mode "mbsync-conf-mode"
@@ -325,10 +324,6 @@
(add-hook 'git-commit-mode-hook 'electric-quote-local-mode)
-(add-hook 'python-mode-hook 'electric-pair-local-mode)
-
-(add-hook 'python-mode-hook 'flycheck-mode)
-
(add-hook 'web-mode-hook 'init-whitespace-only-tabs-mode)
(add-hook 'makefile-mode-hook 'init-whitespace-only-tabs-mode)
diff --git a/emacs/.emacs.d/init/oni-python-init.el b/emacs/.emacs.d/init/oni-python-init.el
new file mode 100755
index 0000000..37cd9b7
--- /dev/null
+++ b/emacs/.emacs.d/init/oni-python-init.el
@@ -0,0 +1,34 @@
+;;; oni-python-init.el --- Python mode configuration -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2018 Tom Willemse
+
+;; Author: Tom Willemse <tom@ryuslash.org>
+;; Keywords: local
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; My Python mode configuration.
+
+;;; Code:
+
+(add-hook 'python-mode-hook 'electric-pair-local-mode)
+(add-hook 'python-mode-hook 'flycheck-mode)
+(add-hook 'python-mode-hook 'fci-mode)
+(add-hook 'python-mode-hook 'company-mode)
+(add-hook 'python-mode-hook 'fic-mode)
+
+(provide 'oni-python-init)
+;;; oni-python-init.el ends here