symbol-overlay
- Description
- Highlight symbols with keymap-enabled overlays
- Latest
- symbol-overlay-4.3.0.20240913.162400.tar (.sig), 2024-Sep-13, 50.0 KiB
- Maintainer
- wolray <wolray@foxmail.com>
- Website
- https://github.com/wolray/symbol-overlay/
- Browse ELPA's repository
- CGit or Gitweb
- Badge
To install this package from Emacs, use package-install
or list-packages
.
Full description
Highlighting symbols with overlays while providing a keymap for various operations about highlighted symbols. It was originally inspired by the package `highlight-symbol'. The fundamental difference is that in `symbol-overlay' every symbol is highlighted by the Emacs built-in function `overlay-put' rather than the `font-lock' mechanism used in `highlight-symbol'. Advantages When highlighting symbols in a buffer of regular size and language, `overlay-put' behaves as fast as the traditional highlighting method `font-lock'. However, for a buffer of major-mode with complicated keywords syntax, like haskell-mode, `font-lock' is quite slow even the buffer is less than 100 lines. Besides, when counting the number of highlighted occurrences, `highlight-symbol' will call the function `how-many' twice, which could also result in an unpleasant delay in a large buffer. Those problems don't exist in `symbol-overlay'. When putting overlays on symbols, an auto-activated overlay-inside keymap will enable you to call various useful commands with a single keystroke. Toggle all overlays of symbol at point: `symbol-overlay-put' Jump between locations of symbol at point: `symbol-overlay-jump-next' & `symbol-overlay-jump-prev' Switch to the closest symbol highlighted nearby: `symbol-overlay-switch-forward' & `symbol-overlay-switch-backward' Minor mode for auto-highlighting symbol at point: `symbol-overlay-mode' Remove all highlighted symbols in the buffer: `symbol-overlay-remove-all' Copy symbol at point: `symbol-overlay-save-symbol' Toggle overlays to be showed in buffer or only in scope: `symbol-overlay-toggle-in-scope' Jump back to the position before a recent jump: `symbol-overlay-echo-mark' Jump to the definition of symbol at point: `symbol-overlay-jump-to-definition' Isearch symbol at point literally: `symbol-overlay-isearch-literally' Query replace symbol at point: `symbol-overlay-query-replace' Rename symbol at point on all its occurrences: `symbol-overlay-rename' Usage To use `symbol-overlay' in your Emacs, you need only to bind these keys: (require 'symbol-overlay) (global-set-key (kbd "M-i") 'symbol-overlay-put) (global-set-key (kbd "M-n") 'symbol-overlay-switch-forward) (global-set-key (kbd "M-p") 'symbol-overlay-switch-backward) (global-set-key (kbd "<f7>") 'symbol-overlay-mode) (global-set-key (kbd "<f8>") 'symbol-overlay-remove-all) Default key-bindings are defined in `symbol-overlay-map'. You can re-bind the commands to any keys you prefer by simply writing (define-key symbol-overlay-map (kbd "your-prefer-key") 'any-command)
Old versions
symbol-overlay-4.2.0.20240912.105304.tar.lz | 2024-Sep-12 | 9.45 KiB |
symbol-overlay-4.1.0.20240311.120733.tar.lz | 2024-Mar-31 | 9.47 KiB |
symbol-overlay-4.1.0.20240203.135517.tar.lz | 2024-Feb-03 | 9.41 KiB |
symbol-overlay-4.1.0.20231110.173648.tar.lz | 2023-Nov-10 | 9.42 KiB |
symbol-overlay-4.1.0.20230729.80753.tar.lz | 2023-Jul-29 | 9.35 KiB |
symbol-overlay-4.1.0.20230727.55242.tar.lz | 2023-Jul-27 | 9.27 KiB |
symbol-overlay-4.1.0.20230602.85109.tar.lz | 2023-Jun-02 | 9.16 KiB |
symbol-overlay-4.1.0.20230117.122744.tar.lz | 2023-Jan-17 | 9.16 KiB |
symbol-overlay-4.1.0.20221215.174154.tar.lz | 2022-Dec-15 | 9.14 KiB |
symbol-overlay-4.1.0.20220304.91702.tar.lz | 2022-Jul-07 | 8.52 KiB |