feat(sterni/emacs): add key bindings for project-* commands

Change-Id: I482b629747adebe049e1e145c13efec17a0d2b7d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5571
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
This commit is contained in:
sterni 2022-05-10 16:16:28 +02:00 committed by clbot
parent 1e3306ab57
commit 5cccb0c573

View file

@ -119,6 +119,14 @@
; default, but allows ';' as prompt
(setq shell-prompt-pattern "^[^#$%>;\n]*[#$%>;] *")
;; projects (see also evil config)
(setq project-switch-commands
'((project-find-file "Find file")
(project-find-regexp "Find regexp")
(project-dired "Dired")
(project-shell "Shell")))
;;; Configure packages
(require 'use-package)
@ -164,6 +172,14 @@
(define-key evil-window-map (kbd "<right>") 'evil-window-right)
(define-key evil-window-map (kbd "<up>") 'evil-window-up)
(define-key evil-window-map (kbd "<down>") 'evil-window-down)
;; projects
(evil-define-key 'normal 'global (kbd "<leader>pf") 'project-find-file)
(evil-define-key 'normal 'global (kbd "<leader>pg") 'project-find-regexp)
(evil-define-key 'normal 'global (kbd "<leader>pd") 'project-dired)
(evil-define-key 'normal 'global (kbd "<leader>ps") 'project-shell)
(evil-define-key 'normal 'global (kbd "<leader>pR") 'project-query-replace-regexp)
(evil-define-key 'normal 'global (kbd "<leader>pK") 'project-kill-buffers)
(evil-define-key 'normal 'global (kbd "<leader>pp") 'project-switch-project)
;; emacs
(evil-define-key 'visual 'global (kbd "<leader>ee") 'eval-region)
(evil-define-key 'normal 'global (kbd "<leader>ee") 'eval-last-sexp)