{"id":13479708,"url":"https://github.com/preservim/vim-wheel","last_synced_at":"2025-04-11T02:10:31.132Z","repository":{"id":13738990,"uuid":"16433341","full_name":"preservim/vim-wheel","owner":"preservim","description":"Screen-anchored cursor movement for Vim","archived":false,"fork":false,"pushed_at":"2022-02-13T12:36:38.000Z","size":1272,"stargazers_count":79,"open_issues_count":4,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T23:35:17.799Z","etag":null,"topics":["navigation","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/preservim.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-01T12:09:44.000Z","updated_at":"2024-10-12T18:03:06.000Z","dependencies_parsed_at":"2022-09-23T14:50:47.161Z","dependency_job_id":null,"html_url":"https://github.com/preservim/vim-wheel","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preservim%2Fvim-wheel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preservim%2Fvim-wheel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preservim%2Fvim-wheel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preservim%2Fvim-wheel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preservim","download_url":"https://codeload.github.com/preservim/vim-wheel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248328160,"owners_count":21085261,"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":["navigation","vim","vim-plugin"],"created_at":"2024-07-31T16:02:21.772Z","updated_at":"2025-04-11T02:10:31.110Z","avatar_url":"https://github.com/preservim.png","language":"Vim script","funding_links":[],"categories":["Vim Script"],"sub_categories":[],"readme":"# vim-wheel\n\n\u003e Screen-anchored cursor movement for Vim\n\n\u003cbr/\u003e\n\n- - -\n![demo](https://i.imgur.com/kTSkSB2.gif)\n- - -\n\n# Features\n\nThis plugin merges the standard cursor movement of `j` and `k` with the\nscrolling of `\u003cCTRL-E\u003e` and `\u003cCTRL-Y\u003e` to produce a new screen-anchored\ncursor movement. This roughly emulates movement when using a trackpad or\nscroll wheel.\n\n* By default, two keys are mapped: `\u003cCTRL-J\u003e` (like `j`) moves towards the\n  end of buffer and `\u003cCTRL-K\u003e` (like `k`) move towards its beginning\n* Movement is tied to trackpad/scroll wheel for ‘natural’ scrolling\n* Due to Vim’s inherent jumpiness with `wrap` enabled, you have option to\n  degrade to `gj` and `gk` (more details below)\n* Supports Visual selection\n* Pure Vimscript with no dependencies\n\n## Installation\n\nYou can install using your favorite Vim package manager. (E.g.,\n[Pathogen][pathogen], [Vundle][vundle], or [Plug][plug].) If you are using\na recent version of vim or neovim, you can also use native package\nsupport. (See [:help packages][packages].)\n\n[pathogen]: https://github.com/tpope/vim-pathogen\n[vundle]: https://github.com/VundleVim/Vundle.vim\n[plug]: https://github.com/junegunn/vim-plug\n[packages]: https://vimhelp.org/repeat.txt.html#packages\n\n## Configuration\n\nYou can change the behavior of this plugin in your `.vimrc`:\n\nFor instance, the default mappings of:\n\n```vim\nlet g:wheel#map#up   = '\u003cc-k\u003e'\nlet g:wheel#map#down = '\u003cc-j\u003e'\n```\n\n...can be changed to use the Command key in MacVim:\n\n```vim\nlet g:wheel#map#up   = '\u003cD-k\u003e'\nlet g:wheel#map#down = '\u003cD-j\u003e'\n```\n\nIf you have any existing mappings to `\u003cc-k\u003e` or `\u003cc-j\u003e`, they will be\npreserved.\n\n### Trackpad/Scroll wheel behavior\n\nBy default the scroll behavior of the mouse will reflect this new\nbehavior. You can disable in your `.vimrc` if not desired.\n\n* Natural - content tracks finger movement on trackpad\n* Reverse - swiping down moves content up\n\n```vim\nlet g:wheel#map#mouse = 1       \" 1=natural, 0=disable, -1=reverse\n```\n\n### End of buffer threshold\n\n_wheel_’s scrolling will cease when cursor nears the start or end of the\nbuffer, degrading to `gj` and `gk`. You can adjust this threshold in your\n`.vimrc`:\n\n```vim\nlet g:wheel#line#threshold = 5      \" lines from start or end\n```\n\n### Behavior with wrap\n\nWith large blocks of wrapped text, Vim’s native scrolling with `CTRL-E`\nand `CTRL-Y` can be jumpy. _wheel_ inherits this behavior, unfortunately.\nIf you would prefer that _wheel_ degrade to `gj` and `gk` when `wrap` is on,\nyou can disable the anchored scrolling in your `.vimrc`:\n\n```\nlet g:wheel#scroll_on_wrap = 1      \" 0=disable, 1=enable (default)\n```\n\n## See also\n\nIf you find this plugin useful, check out these others originally by\n[@reedes][re]:\n\n* [vim-colors-pencil][cp] - color scheme for Vim inspired by IA Writer\n* [vim-lexical][lx] - building on Vim’s spell-check and thesaurus/dictionary completion\n* [vim-litecorrect][lc] - lightweight auto-correction for Vim\n* [vim-pencil][pn] - Rethinking Vim as a tool for writers\n* [vim-textobj-quote][qu] - extends Vim to support typographic (‘curly’) quotes\n* [vim-textobj-sentence][ts] - improving on Vim's native sentence motion command\n* [vim-thematic][th] - modify Vim’s appearance to suit your task and environment\n* [vim-wordy][wo] - uncovering usage problems in writing\n* [vim-wordchipper][wc] - power tool for shredding text in Insert mode\n\n[re]: https://github.com/reedes\n[cp]: https://github.com/preservim/vim-colors-pencil\n[pn]: https://github.com/preservim/vim-pencil\n[lx]: https://github.com/preservim/vim-lexical\n[lc]: https://github.com/preservim/vim-litecorrect\n[qu]: https://github.com/preservim/vim-textobj-quote\n[ts]: https://github.com/preservim/vim-textobj-sentence\n[th]: https://github.com/preservim/vim-thematic\n[wo]: https://github.com/preservim/vim-wordy\n[wc]: https://github.com/preservim/vim-wordchipper\n\n## Future development\n\nThere’s an experimental horizontal scrolling movement hidden within for\nthose who wish to try it out.\n\nIf you’ve spotted a problem or have an idea on improving this plugin,\nplease post it to the [GitHub project issue page][issues].\n\n[issues]: https://github.com/preservim/vim-wheel/issues\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreservim%2Fvim-wheel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreservim%2Fvim-wheel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreservim%2Fvim-wheel/lists"}