{"id":18626073,"url":"https://github.com/ericbn/vim-relativize","last_synced_at":"2025-04-11T05:30:41.698Z","repository":{"id":96153564,"uuid":"67057965","full_name":"ericbn/vim-relativize","owner":"ericbn","description":"This Vim plugin only shows relative line numbers when you need them.","archived":false,"fork":false,"pushed_at":"2017-12-16T19:02:17.000Z","size":7,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T09:47:46.646Z","etag":null,"topics":["vim","vim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Vim script","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/ericbn.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-31T17:14:36.000Z","updated_at":"2021-08-20T05:41:34.000Z","dependencies_parsed_at":"2023-04-11T08:47:29.600Z","dependency_job_id":null,"html_url":"https://github.com/ericbn/vim-relativize","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericbn%2Fvim-relativize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericbn%2Fvim-relativize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericbn%2Fvim-relativize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericbn%2Fvim-relativize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericbn","download_url":"https://codeload.github.com/ericbn/vim-relativize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248347323,"owners_count":21088625,"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":["vim","vim-plugin"],"created_at":"2024-11-07T04:36:51.102Z","updated_at":"2025-04-11T05:30:41.650Z","avatar_url":"https://github.com/ericbn.png","language":"Vim script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# relativize.vim\n\nThis plugin only shows relative line numbers when you need them: in the current\nwindow, and if you're not in insert mode. Otherwise, it will give you the\nabsolute numbers. As suggested by [Jeff\nKreeftmeijer](http://jeffkreeftmeijer.com/2012/relative-line-numbers-in-vim-for-super-fast-movement/).\n\n## Installation\n\n- Using [pathogen.vim](https://github.com/tpope/vim-pathogen):\n\n        cd ~/.vim/bundle\n        git clone git://github.com/ericbn/vim-relativize.git\n\n- Using [vim-plug](https://github.com/junegunn/vim-plug):\n\n        Plug 'ericbn/vim-relativize'\n\n## Configuration\n\nAdd one of the following to your `.vimrc` depending on the initial look you\nwant:\n\n- Relative line numbers when you need them:\n\n        set relativenumber\n\n- Relative numbers when you need them, with the absolute line number in the\n  current line (requires at least Vim 7.4):\n\n        set number relativenumber\n\n- Absolute line numbers all the time (toggle relative numbers when you need\n  them with `:RelativizeToggle`):\n\n        set number\n\n- No numbers at all (use the map below to switch numbers from appearing, will\n  first switch to absolute line numbers):\n\n  (nothing)\n\nYou can toggle relative line numbers from appearing with `:RelativizeToggle`.\nTo map a key (e.g. \u003ckbd\u003eF2\u003c/kbd\u003e) to this command, add the following to your\n`.vimrc`:\n\n    nnoremap \u003csilent\u003e \u003cF2\u003e :RelativizeToggle\u003cCR\u003e\n\nTo map a key (e.g. \u003ckbd\u003eF3\u003c/kbd\u003e) to switch the numbers from appearing or not\nat all, add this to your `.vimrc`:\n\n\n    nnoremap \u003csilent\u003e \u003cF3\u003e :let [\u0026number, \u0026relativenumber] =\n      \\ [!\u0026number \u0026\u0026 (g:relativize_with_number \\|\\| !g:relativize_enabled),\n      \\ !\u0026relativenumber \u0026\u0026 g:relativize_enabled]\u003cCR\u003e\n\n## Why another 'relativenumber' plugin?\n\nThis is a no-nonsense plugin with only 27 lines of code. I believe this is how\na plugin for such a simple feature should be. It is flexible, and plays well\nwith other plugins without the need for extra configuration options.\n\nIf you want a plugin that needs more configuration options, try\n[numbertoggle](https://github.com/jeffkreeftmeijer/vim-numbertoggle),\n[numbers.vim](https://github.com/myusuf3/numbers.vim),\n[vim-relativity](https://github.com/kennykaye/vim-relativity),\n[vim-autonumber](https://github.com/foriequal0/vim-autonumber),\n[RelativeNumberCurrentWindow](https://github.com/vim-scripts/RelativeNumberCurrentWindow)\nor [smartnumber.vim](https://github.com/mopp/smartnumber.vim).\n\nTo have relative line numbering only in operator-pending mode, try\n[RelOps](https://github.com/vim-scripts/RelOps).\n\nIf you want an even simpler plugin, that will only switch between absolute and\nrelative line numbers on a mapped key or lead shortcut, try\n[toggle-numbers.vim](https://github.com/fullybaked/toggle-numbers.vim) or\n[vim-toggle-relative-line-numbers](https://github.com/gangleri/vim-toggle-relative-line-numbers).\n\n## License\n\nCopyright © Eric Nielsen. Distributed under the same terms as Vim itself.  See\n`:help license`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericbn%2Fvim-relativize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericbn%2Fvim-relativize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericbn%2Fvim-relativize/lists"}