d4cca74854
Emacs 26 added built-in support for line numbers, relative line numbers, and visual line numbers. Spacemacs supports only absolute and relative, but there is no way to access the visual mode. It's hard to get around this, since Spacemacs abstracts line numbers to a reasonably high degree. Arguably, `visual` is much more useful than `relative` as a display type. Visual line numbers are like relative line numbers, but only lines that are actually showing are counted. This means: 1. Hidden lines are not counted. If a large amount of text is folded, the line numbers won't jump from "10" to "546". This is particularly useful in buffers like `magit-status`, where a large amount of information is folded by default. 2. Lines that are wrapped are counted as multiple lines, since they're being displayed as multiple lines in the editor. Each visual line will be numbered - unlike `relative`, where the entire thing is numbered... Once. With standard relative line numbers, you can't actually navigate using the line numbers in the sidebar as soon as folded or wrapped lines are introduced. Since this is one of the main use cases for relative line numbers, this is a big problem. Visual mode fixes that problem. Every line that's being displayed is labelled. Numbers always correspond to the actual number of lines you'd need to navigate to reach that line. This commit extends Spacemacs' line number interface to provide visual line number support. |
||
---|---|---|
.. | ||
.spacemacs.template | ||
packages.el.template | ||
README.org.template | ||
REPORTING.template |
#+TITLE: %LAYER_NAME% layer # Document tags are separated with "|" char # The example below contains 2 tags: "layer" and "web service" # Avaliable tags are listed in <spacemacs_root>/.ci/spacedoc-cfg.edn # under ":spacetools.spacedoc.config/valid-tags" section. #+TAGS: layer|web service # The maximum height of the logo should be 200 pixels. [[img/%LAYER_NAME%.png]] # TOC links should be GitHub style anchors. * Table of Contents :TOC_4_gh:noexport: - [[#description][Description]] - [[#features][Features:]] - [[#install][Install]] - [[#key-bindings][Key bindings]] * Description This layer adds support for something. ** Features: - Autocomplete - Lint - Refactor - ... * Install To use this configuration layer, add it to your =~/.spacemacs=. You will need to add =%LAYER_NAME%= to the existing =dotspacemacs-configuration-layers= list in this file. * Key bindings | Key Binding | Description | |-------------+----------------| | ~SPC x x x~ | Does thing01 | # Use GitHub URLs if you wish to link a Spacemacs documentation file or its heading. # Examples: # [[https://github.com/syl20bnr/spacemacs/blob/master/doc/VIMUSERS.org#sessions]] # [[https://github.com/syl20bnr/spacemacs/blob/master/layers/%2Bfun/emoji/README.org][Link to Emoji layer README.org]] # If space-doc-mode is enabled, Spacemacs will open a local copy of the linked file.