Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alphapapa/topsy.el
Simple sticky header showing definition beyond top of window
https://github.com/alphapapa/topsy.el
emacs
Last synced: 2 months ago
JSON representation
Simple sticky header showing definition beyond top of window
- Host: GitHub
- URL: https://github.com/alphapapa/topsy.el
- Owner: alphapapa
- License: gpl-3.0
- Created: 2020-12-21T06:26:36.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-12T20:51:46.000Z (7 months ago)
- Last Synced: 2024-06-14T02:57:27.640Z (7 months ago)
- Topics: emacs
- Language: Emacs Lisp
- Homepage:
- Size: 279 KB
- Stars: 92
- Watchers: 3
- Forks: 5
- Open Issues: 10
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+TITLE: topsy.el
#+PROPERTY: LOGGING nil
# Note: This readme works with the org-make-toc package, which automatically updates the table of contents.
#+HTML:
# [[https://melpa.org/#/package-name][file:https://melpa.org/packages/topsy-badge.svg]] [[https://stable.melpa.org/#/package-name][file:https://stable.melpa.org/packages/topsy-badge.svg]]
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 [[https://github.com/alphapapa/org-sticky-header][org-sticky-header]].
* Screenshots
#+ATTR_HTML: :clear right
[[images/screenshot.png]]* Contents :noexport:
:PROPERTIES:
:TOC: :include siblings
:END:
:CONTENTS:
- [[#installation][Installation]]
- [[#usage][Usage]]
- [[#changelog][Changelog]]
- [[#development][Development]]
:END:* Installation
:PROPERTIES:
:TOC: :depth 0
:END:** MELPA
If you installed from MELPA, you're done. Just run one of the commands below.
** Quelpa
The recommended way to install is with [[https://github.com/quelpa/quelpa-use-package][quelpa-use-package]], like this:
#+BEGIN_SRC elisp
;; 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))
#+END_SRC** Manual
Put =topsy.el= in your ~load-path~, then:
#+BEGIN_SRC elisp
(require 'topsy)(add-hook 'prog-mode-hook #'topsy-mode)
(add-hook 'magit-section-mode-hook #'topsy-mode)
#+END_SRC* Usage
:PROPERTIES:
:TOC: :depth 0
:END:Run command ~topsy-mode~. You may add it to appropriate hooks, such as ~prog-mode-hook~ and ~magit-section-mode-hook~.
** Tips
+ You can customize settings in the =topsy= group.
* Changelog
:PROPERTIES:
:TOC: :depth 0
:END:** 0.1-pre
Not yet tagged.
# * Credits
#
# This package would not have been possible without the following packages: [[https://example.com/foo.el][foo]] which showed me how to bifurcate, and [[https://example.com/bar.el][bar]], which takes care of flanges.* Development
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.
* License
:PROPERTIES:
:TOC: :ignore (this)
:END:GPLv3
# Local Variables:
# eval: (require 'org-make-toc)
# before-save-hook: org-make-toc
# org-export-with-properties: ()
# org-export-with-title: t
# End: