Move python config to separate file

This commit is contained in:
Tom Willemse 2018-07-09 19:04:15 -07:00
parent 4cf35095ff
commit 230ae96d40
2 changed files with 37 additions and 8 deletions

View file

@ -84,14 +84,11 @@
(setq auto-save-list-file-prefix (oni:data-location "auto-save-list/.saves-")) (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 "C-M-SPC") 'er/expand-region)
(global-set-key (kbd "M-+") 'mc/mark-next-like-this) (global-set-key (kbd "M-+") 'mc/mark-next-like-this)
(global-set-key (kbd "C-c (") 'embrace-commander) (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 o") 'oni-hydra-org/body)
(global-set-key (kbd "C-c m") 'oni-hydra-magit/body) (global-set-key (kbd "C-c m") 'oni-hydra-magit/body)
(global-set-key (kbd "C-x f") 'ffap)
(require 'destroy-trailing-whitespace) (require 'destroy-trailing-whitespace)
(global-destroy-trailing-whitespace-mode) (global-destroy-trailing-whitespace-mode)
@ -305,6 +302,8 @@
(with-eval-after-load 'cc-mode (load "oni-java-init")) (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) (add-hook 'ielm-mode-hook 'paredit-mode)
(autoload 'mbsync-conf-mode "mbsync-conf-mode" (autoload 'mbsync-conf-mode "mbsync-conf-mode"
@ -325,10 +324,6 @@
(add-hook 'git-commit-mode-hook 'electric-quote-local-mode) (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 'web-mode-hook 'init-whitespace-only-tabs-mode)
(add-hook 'makefile-mode-hook 'init-whitespace-only-tabs-mode) (add-hook 'makefile-mode-hook 'init-whitespace-only-tabs-mode)

View file

@ -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