don't override original actions

This commit is contained in:
fuxialexander 2018-07-05 00:38:41 +08:00
parent 8f74ce982d
commit 0df9bae16b

View file

@ -101,17 +101,21 @@ immediately runs it on the current candidate (ending the ivy session)."
;; Configure `counsel-find-file'
(ivy-add-actions
'counsel-find-file
`(("c" ,(+ivy/given-file #'copy-file "Copy file") "copy file")
`(("b" counsel-find-file-cd-bookmark-action "cd bookmark")
("s" counsel-find-file-as-root "open as root")
("m" counsel-find-file-mkdir-action "mkdir")
("c" ,(+ivy/given-file #'copy-file "Copy file") "copy file")
("d" ,(+ivy/reloading #'+ivy/confirm-delete-file) "delete")
("r" (lambda (path) (rename-file path (read-string "New name: "))) "Rename")
("m" ,(+ivy/reloading (+ivy/given-file #'rename-file "Move")) "move")
("r" (lambda (path) (rename-file path (read-string "New name: "))) "rename")
("R" ,(+ivy/reloading (+ivy/given-file #'rename-file "Move")) "move")
("f" find-file-other-window "other window")
("p" (lambda (path) (with-ivy-window (insert (file-relative-name path default-directory)))) "Insert relative path")
("P" (lambda (path) (with-ivy-window (insert path))) "Insert absolute path")
("F" find-file-other-frame "other frame")
("p" (lambda (path) (with-ivy-window (insert (file-relative-name path default-directory)))) "insert relative path")
("P" (lambda (path) (with-ivy-window (insert path))) "insert absolute path")
("l" (lambda (path) "Insert org-link with relative path"
(with-ivy-window (insert (format "[[./%s]]" (file-relative-name path default-directory))))) "Insert org-link (rel. path)")
(with-ivy-window (insert (format "[[./%s]]" (file-relative-name path default-directory))))) "insert org-link (rel. path)")
("L" (lambda (path) "Insert org-link with absolute path"
(with-ivy-window (insert (format "[[%s]]" path)))) "Insert org-link (abs. path)")))
(with-ivy-window (insert (format "[[%s]]" path)))) "insert org-link (abs. path)")))
;; Configure `counsel-rg', `counsel-ag' & `counsel-pt'
(dolist (cmd '(counsel-ag counsel-rg counsel-pt))