From 91900cb0dcdeb4f3920aca4a7cde80f609e633ba Mon Sep 17 00:00:00 2001 From: Rawley Fowler <75388349+rawleyfowler@users.noreply.github.com> Date: Sat, 28 May 2022 11:03:05 -0600 Subject: [PATCH] Update evil :wq and :q --- emacs.d/init.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/emacs.d/init.el b/emacs.d/init.el index 5912b6f..f6951a3 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -61,6 +61,12 @@ (setq evil-vsplit-window-right t) (setq evil-split-window-below t) (evil-mode)) +(defun save-and-kill-buffer () ;; Saves and kills a buffer, vim style + (interactive) + (save-buffer) + (kill-buffer)) +(evil-ex-define-cmd "wq" 'save-and-kill-buffer) +(evil-ex-define-cmd "q" 'kill-buffer) (use-package evil-collection :after evil :ensure t @@ -208,6 +214,7 @@ :mode ("\\.md\\'" . markdown-mode) :hook (markdown-mode . auto-fill-mode)) +(use-package dart-mode) (use-package json-mode) (use-package vimrc-mode) (use-package yaml-mode)