你用 Ivy 或 helm 自定义过那些功能

如题 比如 提取url并打开 org 提取标题并跳转 用模糊搜索补全路径

先用projectile选定一个项目然后打开该项目的文件/magit/文本搜索:

  (defvar jester-projectile-project-history nil "projectile project history")
  (defun jester/select-project-and-do (action &optional do-what)
    "Select a project with projectile, then do `ACTION' in the project.
`ACTION' takes one arg, the selected project dir.
`DO-WHAT' is a string, which is action name displayed by completion interface."
    (let ((projects (projectile-relevant-known-projects)))
      (if projects
          (ivy-read (concat (when do-what (format "%s " do-what)) "in project: ")
                    projects
                    :history 'jester-projectile-project-history
                    :action action)
        (user-error "There are no known projects"))))
  (defun jester/select-project-and-search ()
    "Select a project with projectile, and search it."
    (interactive)
    (jester/select-project-and-do
     (lambda (project-dir) (let ((default-directory project-dir))
                        (counsel-rg)))
     "search"))
  (defun jester/select-project-and-magit-status ()
    "Select a project with projectile, and open magit status."
    (interactive)
    (jester/select-project-and-do
     (lambda (project-dir) (let ((default-directory project-dir))
                        (magit-status)))
     "magit"))
  (defun jester/select-project-and-open-file ()
    "Select a project with projectile, and open a file."
    (interactive)
    (jester/select-project-and-do
     (lambda (project-dir) (let ((default-directory project-dir))
                        (counsel-git)))
     "open file")))
1 个赞

内置的project.el有一个 project-switch-project,可以试试(在master branch),

ivy-head.el

主要的使用场景是插入概念性的笔记。因为这些笔记的层级关系太过明显。缺点 是,时间久了以后,流畅性还是不足。

roam-with-helm

用于漫游导航系统。可用作导航,预览,插入单个、多个链接等功能。

snails-backend-searchablepdf.el

以前欲 PR 但未果。后来也没有类似的需求,也就没继续折腾了。