attempt at rework of finder
This commit is contained in:
parent
9a5c75e431
commit
c9f970ded4
1 changed files with 24 additions and 20 deletions
22
+bindings.el
22
+bindings.el
|
@ -80,10 +80,10 @@ private/hlissner/snippets."
|
|||
(message (kill-new (abbreviate-file-name filename)))
|
||||
(error "Couldn't find filename in current buffer")))
|
||||
|
||||
(defmacro +hlissner-def-finder! (name dir)
|
||||
(defmacro +def-finder! (name dir)
|
||||
"Define a pair of find-file and browse functions."
|
||||
`(progn
|
||||
(defun ,(intern (format "+hlissner/find-in-%s" name)) ()
|
||||
(defun ,(intern (format "+find-in-%s" name)) ()
|
||||
(interactive)
|
||||
(let ((default-directory ,dir)
|
||||
projectile-project-name
|
||||
|
@ -96,11 +96,13 @@ private/hlissner/snippets."
|
|||
(let ((default-directory ,dir))
|
||||
(call-interactively (command-remapping #'find-file))))))
|
||||
|
||||
(+hlissner-def-finder! templates +file-templates-dir)
|
||||
(+hlissner-def-finder! snippets +grfn-snippets-dir)
|
||||
(+hlissner-def-finder! dotfiles (expand-file-name ".dotfiles" "~"))
|
||||
(+hlissner-def-finder! doomd (expand-file-name ".doom.d" "~"))
|
||||
(+hlissner-def-finder! notes +org-dir)
|
||||
(+def-finder! templates +file-templates-dir)
|
||||
(+def-finder! snippets +grfn-snippets-dir)
|
||||
(+def-finder! dotfiles (expand-file-name ".dotfiles" "~"))
|
||||
(+def-finder! doomd (expand-file-name ".doom.d" "~"))
|
||||
(+def-finder! notes +org-dir)
|
||||
(+def-finder! home-config (expand-file-name "code/system/home" "~"))
|
||||
(+def-finder! system-config (expand-file-name "code/system/system" "~"))
|
||||
|
||||
(defun +grfn/paxedit-kill (&optional n)
|
||||
(interactive "p")
|
||||
|
@ -285,9 +287,11 @@ private/hlissner/snippets."
|
|||
:desc "Find file from here" :n "?" #'counsel-file-jump
|
||||
:desc "Find other file" :n "a" #'projectile-find-other-file
|
||||
:desc "Open project editorconfig" :n "c" #'editorconfig-find-current-editorconfig
|
||||
:desc "Find file in dotfiles" :n "d" #'+hlissner/find-in-dotfiles
|
||||
:desc "Find file in dotfiles" :n "d" #'+find-in-dotfiles
|
||||
:desc "Find file in system config" :n "s" #'+find-in-system-config
|
||||
:desc "Find file in home config" :n "h" #'+find-in-home-config
|
||||
:desc "Browse dotfiles" :n "D" #'+hlissner/browse-dotfiles
|
||||
:desc "Find file in emacs.d" :n "e" #'+hlissner/find-in-doomd
|
||||
:desc "Find file in emacs.d" :n "e" #'+find-in-doomd
|
||||
:desc "Browse emacs.d" :n "E" #'+hlissner/browse-doomd
|
||||
:desc "Recent files" :n "r" #'recentf-open-files
|
||||
:desc "Recent project files" :n "R" #'projectile-recentf
|
||||
|
|
Loading…
Reference in a new issue