{"id":13863082,"url":"https://github.com/coldnew/linum-relative","last_synced_at":"2025-08-20T03:30:42.045Z","repository":{"id":2351428,"uuid":"3314307","full_name":"coldnew/linum-relative","owner":"coldnew","description":"display relative line number in the left margin in emacs","archived":false,"fork":false,"pushed_at":"2022-10-25T05:17:15.000Z","size":285,"stargazers_count":169,"open_issues_count":11,"forks_count":19,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-12-09T18:39:53.688Z","etag":null,"topics":["display-line-numbers-mode","emacs","emacs-lisp","linum","linum-mode","melpa"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coldnew.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-01-31T11:51:28.000Z","updated_at":"2024-07-04T11:19:57.000Z","dependencies_parsed_at":"2023-01-11T16:09:32.538Z","dependency_job_id":null,"html_url":"https://github.com/coldnew/linum-relative","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldnew%2Flinum-relative","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldnew%2Flinum-relative/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldnew%2Flinum-relative/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldnew%2Flinum-relative/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coldnew","download_url":"https://codeload.github.com/coldnew/linum-relative/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230388131,"owners_count":18217755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["display-line-numbers-mode","emacs","emacs-lisp","linum","linum-mode","melpa"],"created_at":"2024-08-05T06:02:01.631Z","updated_at":"2024-12-19T06:09:00.193Z","avatar_url":"https://github.com/coldnew.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"\u003ca href=\"http://github.com/coldnew/linum-relative\"\u003e\u003cimg src=\"https://www.gnu.org/software/emacs/images/emacs.png\" alt=\"Emacs Logo\" width=\"80\" height=\"80\" align=\"right\"\u003e\u003c/a\u003e\n## linum-relative.el\n*display relative line number in emacs.*\n\n---\n[![License GPLv2](https://img.shields.io/badge/license-GPL_v2-green.svg)](http://www.gnu.org/licenses/gpl-2.0.html)\n[![MELPA](http://melpa.org/packages/linum-relative-badge.svg)](http://melpa.org/#/linum-relative)\n[![MELPA Stable](http://stable.melpa.org/packages/linum-relative-badge.svg)](http://stable.melpa.org/#/linum-relative)\n\n![Screenshot](https://github.com/coldnew/linum-relative/raw/master/screenshot/screenshot1.jpg)\n\nlinum-relative lets you display relative line numbers for current buffer.\n\n\n### Installation\n\n\nIf you have `melpa` and `emacs24` installed, simply type:\n\n    M-x package-install linum-relative\n\nAnd add the following to your .emacs\n\n    (require 'linum-relative)\n\n### Setup \u0026 Tips\n\n\nThe non-interactive function *linum-on* (which should already be built into recent GNU Emacs distributions), turns on side-bar line numbering:\n\n    (linum-on)\n\nand alternatively, by using command:\n\n    M-x linum-relative-mode\n\nRelative line numbering should already be enabled by default (by installing this package), following *linum-on* or enabling *linum-mode*. One can also use the *linum-relative-toggle* interactive function to switch between relative and non-relative line numbering:\n\n    M-x linum-relative-toggle\n\n\n### Backends\n\n\nBy default, linum-relative use *linum-mode* as backend, since linum-mode is based on emacs-lisp, you may have performance issue on large file.\n\nSince linum-relative 0.6, if you also use emacs version 26.1 or above, you can setup `linum-relative-backend` to make linum-relative-mode use `display-line-number-mode` as backend, which is implement in C so the performance is really nice.\n\nHowever some linum-relative's customize function may not work propely.\n\nHere's how to use `display-line-number-mode` as backend:\n\n```elisp\n     ;; Use `display-line-number-mode` as linum-mode's backend for smooth performance\n\t(setq linum-relative-backend 'display-line-numbers-mode)\n```\n\n\n\n\n### Customization Documentation\n\n#### `linum-relative-current-symbol`\n\nThe symbol you want to show on the current line, by default it is 0.\n   You can use any string like \"-\u003e\". If this variable is empty string,\nlinum-releative will show the real line number at current line.\n\nThis won't take effect if you choose `display-line-numbers-mode` backend.\n\n#### `linum-relative-plusp-offset`\n\nOffset to use for positive relative line numbers.\n\nThis won't take effect if you choose `display-line-numbers-mode` backend.\n\n#### `linum-relative-format`\n\nFormat for each line. Good for adding spaces/paddings like so: \" %3s \"\n\nThis won't take effect if you choose `display-line-numbers-mode` backend.\n\n#### `linum-relative-lighter`\n\nLighter of linum-relative-mode\n\n#### `linum-relative-backend`\n\nThe default backend for `linum-relative`, by default we use\n`linum-mode` (slow), you can switch to `display-line-numbers-mode` if\nyou has emacs-version greater than 26.0.50.\n\n### Function and Macro Documentation\n\n#### `(linum-relative-in-helm-p)`\n\nReturn non nil when in an helm session.\n\n#### `(linum-relative-on)`\n\nTurn ON linum-relative.\n\n#### `(linum-relative-off)`\n\nTurn OFF linum-relative.\n\n#### `(linum-relative-toggle)`\n\nToggle between linum-relative and linum.\n\n-----\n\u003cdiv style=\"padding-top:15px;color: #d0d0d0;\"\u003e\nMarkdown README file generated by\n\u003ca href=\"https://github.com/mgalgs/make-readme-markdown\"\u003emake-readme-markdown.el\u003c/a\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoldnew%2Flinum-relative","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoldnew%2Flinum-relative","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoldnew%2Flinum-relative/lists"}