This library shows a sticky header at the top of the window. The header shows which definition the top line of the window is within. It’s intended as a simple alternative to semantic-stickyfunc-mode
. It’s especially helpful when, for example, browsing a list of occur
results: when a line is in the middle of a definition, and the top of the definition is beyond the top of the window, topsy
shows what definition the line is in.
Mode-specific functions may be added to topsy-mode-functions
.
NOTE: For Org mode buffers, please use org-sticky-header.
If you installed from MELPA, you’re done. Just run one of the commands below.
The recommended way to install is with quelpa-use-package, like this:
;; Install and load `quelpa-use-package'.
(package-install 'quelpa-use-package)
(require 'quelpa-use-package)
(use-package topsy
:quelpa (topsy :fetcher github :repo "alphapapa/topsy.el")
:hook
(prog-mode . topsy-mode)
(magit-section-mode . topsy-mode))
Put topsy.el
in your load-path
, then:
(require 'topsy)
(add-hook 'prog-mode-hook #'topsy-mode)
(add-hook 'magit-section-mode-hook #'topsy-mode)
Run command topsy-mode
. You may add it to appropriate hooks, such as prog-mode-hook
and magit-section-mode-hook
.
- You can customize settings in the
topsy
group.
Not yet tagged.
Bug reports, feature requests, suggestions — oh my!
There is currently only one function in topsy-mode-functions
, one which returns the line that beginning-of-defun
goes to. It should be useful in many major modes, but suggestions for additional, mode-specific functions are welcome.
GPLv3