From 780b48bb855662a86db75165e7cb8aac4174cd5c Mon Sep 17 00:00:00 2001 From: Julian T Date: Fri, 21 Oct 2022 16:34:48 +0200 Subject: Haskell windmove and emacs in some buffers --- emacs/.emacs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'emacs') diff --git a/emacs/.emacs b/emacs/.emacs index 07376b7..df93c8f 100644 --- a/emacs/.emacs +++ b/emacs/.emacs @@ -16,6 +16,26 @@ ; (require 'evil-collection) ; (evil-collection-init) +(evil-set-initial-state 'haskell-interactive-mode 'emacs) +(evil-set-initial-state 'haskell-error-mode 'emacs) + +;; Windmove +(defvar vim-move-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "C-w") nil) + (define-key map (kbd "C-w l") 'windmove-right) + (define-key map (kbd "C-w h") 'windmove-left) + (define-key map (kbd "C-w j") 'windmove-down) + (define-key map (kbd "C-w k") 'windmove-up) + (define-key map (kbd "C-w C-w") 'other-window) + map) "vim-move-mode keymap.") + +(define-minor-mode vim-move-mode + "A minor mode where C-w works somewhat like what im used to." + :init-value t + :lighter " vim-move") +(vim-move-mode 1) + (require 'magit) (require 'undo-tree) @@ -83,7 +103,7 @@ '(display-line-numbers-type 'relative) '(global-display-line-numbers-mode t) '(package-selected-packages - '(magit undo-tree 'flycheck 'flycheck bbdb haskell-mode evil)) + '(go-mode magit undo-tree 'flycheck 'flycheck bbdb haskell-mode evil)) '(tool-bar-mode nil) '(warning-suppress-types '((org)))) (custom-set-faces -- cgit v1.2.3