diff --git a/evil-collection.el b/evil-collection.el index 7790a6b..325b3fe 100644 --- a/evil-collection.el +++ b/evil-collection.el @@ -41,6 +41,7 @@ bookmark calendar cider + comint company compile custom diff --git a/evil-comint.el b/evil-comint.el new file mode 100644 index 0000000..7ccc777 --- /dev/null +++ b/evil-comint.el @@ -0,0 +1,51 @@ +;;; evil-comint.el --- Bindings for `comint-mode'. -*- lexical-binding: t -*- + +;; Copyright (C) 2017 James Nguyen + +;; Author: James Nguyen +;; Maintainer: James Nguyen +;; Pierre Neidhardt +;; URL: https://github.com/jojojames/evil-collection +;; Version: 0.0.1 +;; Package-Requires: ((emacs "25.1")) +;; Keywords: evil, comint + +;; 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 . + +;;; Commentary: +;;; Bindings for `comint-mode'. + +;;; Code: +(require 'comint) +(require 'evil) + +(defun evil-comint-setup () + (when evil-want-C-d-scroll + (evil-define-key 'normal comint-mode-map + (kbd "C-d") #'evil-scroll-down)) + + (evil-define-key 'normal comint-mode-map + (kbd "C-j") #'comint-next-input + (kbd "C-k") #'comint-previous-input + (kbd "gj") #'comint-next-input + (kbd "gk") #'comint-previous-input + (kbd "]") #'comint-next-input + (kbd "[") #'comint-previous-input) + + (evil-define-key 'insert comint-mode-map + (kbd "") #'comint-previous-input + (kbd "") #'comint-next-input)) + +(provide 'evil-comint) +;;; evil-comint.el ends here