From c117e73afe85151afdb313113584143c5287e173 Mon Sep 17 00:00:00 2001 From: Anthony Cicchetti Date: Sun, 13 Dec 2020 12:18:37 -0500 Subject: [PATCH] Huge amount of emacs changes and work --- emacs/init.el | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/emacs/init.el b/emacs/init.el index 2ad180b..5f43ddc 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -14,8 +14,10 @@ auto-complete evil magit - evil-magit base16-theme + evil-collection + undo-tree + which-key )) (dolist (p my-packages) @@ -23,6 +25,7 @@ (package-install p))) (load-theme 'base16-oceanicnext t) +(which-key-mode) (custom-set-variables ;; custom-set-variables was added by Custom. @@ -30,7 +33,11 @@ ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(package-selected-packages - '(lispy smartparens which-key git-gutter rainbow-delimiters auto-complete-distel auto-complete evil magit evil-magit))) + '(lispy smartparens which-key git-gutter rainbow-delimiters auto-complete-distel auto-complete evil magit evil-magit)) + '(undo-tree-auto-save-history t) + '(undo-tree-history-directory-alist '(("." . "~/.undohist-emacs"))) + '(undo-tree-visualizer-diff t) + '(undo-tree-visualizer-timestamps t)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. @@ -38,19 +45,30 @@ ;; If there is more than one, they won't work right. ) +;; Undo-tree +(global-undo-tree-mode) + ;; Autocomplete (require 'auto-complete) (global-auto-complete-mode t) ;; EVIL +(setq evil-want-keybinding nil) (require 'evil) -(define-key evil-normal-state-map (kbd "C-k") 'evil-scroll-up) -(define-key evil-normal-state-map (kbd "C-j") 'evil-scroll-down) +(evil-collection-init) +(evil-set-leader 'normal (kbd "SPC")) +(evil-define-key 'normal 'global (kbd "C-k") 'evil-scroll-up) +(evil-define-key 'normal 'global (kbd "C-j") 'evil-scroll-down) +(evil-define-key 'normal 'global (kbd "l") 'evil-window-right) +(evil-define-key 'normal 'global (kbd "h") 'evil-window-left) +(evil-define-key 'normal 'global (kbd "j") 'evil-window-up) +(evil-define-key 'normal 'global (kbd "k") 'evil-window-down) +(evil-define-key 'normal 'global (kbd "i") 'help) (evil-mode 1) -(require 'evil-magit) ;; Rainbow Delims (add-hook 'prog-mode-hook #'rainbow-delimiters-mode) +(show-paren-mode) ;; Git gutter (global-git-gutter-mode +1)