From 71857534218f98d43466799d4dae86f7b66f0ad6 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Mon, 7 Aug 2023 00:27:22 +0100 Subject: [PATCH] Temporarily enable evil-mode for experimentation --- emacs.el | 26 +++++++++++++++++++++++++- flake.lock | 6 +++--- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/emacs.el b/emacs.el index 838d1af..6d63622 100755 --- a/emacs.el +++ b/emacs.el @@ -238,6 +238,7 @@ (use-package consult) (global-set-key (kbd "M-s r") 'consult-ripgrep) +(setq completion-in-region-function 'consult-completion-in-region) ;; Navigation when in russian layout @@ -270,6 +271,20 @@ (setq-default bidi-display-reordering nil) +;; -------- Evil mode -------- + +;; Evil mode is a vi/vim compatibility layer for Emacs that provides roughly +;; equivalent keybindings for editing. + +(setq evil-want-keybinding nil) +(setq evil-want-C-u-scroll t) +(use-package evil) +(use-package evil-collection) +(add-hook 'after-init-hook #'(lambda () + (evil-mode 1) + (evil-set-undo-system 'undo-redo) + (evil-collection-init))) + ;; -------- Tools and environment -------- ;; By default, Emacs doesn't add system path to its search places @@ -307,10 +322,19 @@ Enable org-roam " t nil) (setq org-roam-capture-templates - `(("d" "default" plain "%?" + `( + ("d" "default" plain "%?" :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") :unnarrowed t) + ("p" "post" plain "%?" + :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" + ,(concat "#+date: %<%Y-%m-%dT%H:%M:%S>Z\n" + "#+slug: ${slug}\n" + "#+title: ${title}\n" + "#+filetags: Post\n" + "\n")) + :unnarrowed t) ("i" "interview" plain "%?" :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" ,(concat "#+title: ${title}\n" diff --git a/flake.lock b/flake.lock index a464066..9e6200b 100755 --- a/flake.lock +++ b/flake.lock @@ -67,11 +67,11 @@ ] }, "locked": { - "lastModified": 1691005674, - "narHash": "sha256-81Z0ytKtBPxIyE3WebRkFXwsRjZGOg7a5VwmHMY/EAY=", + "lastModified": 1691271263, + "narHash": "sha256-ug+HYWVjjRoSLauLHwCJfqwbW52wfTt3aRi32vZGO2I=", "owner": "~knazarov", "repo": "knazarov.com", - "rev": "0aa3167e06a353d25debf493a6d4c1c61796a080", + "rev": "ae2f5203317748f5d3c33fff9c069c479aeca819", "type": "sourcehut" }, "original": {