If you haven’t used imenu, do this, load up some source code or an
org-mode file, and:
Return(to select the function)
Slick. The problem is you have to either use the mouse, or do a lot of typing with tab to get to the function or header you want.
Assuming you have use-package installed to both install and configure packages, put this in your
.emacs file and smoke it:
(use-package idomenu :ensure t :bind ("C-c i" . idomenu))
Now, you have a key binding to search your functions using IDO’s sweet approach to text selection.
If you are mousy or don’t want the visual clutter associated with increasing your mini-buffer, I suggest usingimenu+ and its expansion on the standard menu support for
(use-package imenu+ :ensure t :init (add-hook 'prog-mode-hook 'imenup-add-defs-to-menubar) (add-hook 'org-mode-hook 'imenup-add-defs-to-menubar))
Finally, if you are a Helm person, this approach creates a list of all functions/headers in a side buffer making it easier to see more options. Good for when you are looking at new source code:
(use-package helm :ensure t :bind (("C-c M-i" . helm-imenu)))
Next time, we should talk about tags…
原文出处: Howard Abrams
原文时间: 2016-01-06 16:00
整理时间: 2016-01-07 23:35
本文由 Hick 整理，转载请保留以上信息;
The articles on this site come from Internet, thanks to all the original authors.
If anything about COPYRIGHT, or LEFT, please contact Emacsist at gmail dot com .