{"id":13895372,"url":"https://github.com/occivink/kakoune-phantom-selection","last_synced_at":"2025-07-17T11:30:37.205Z","repository":{"id":25580737,"uuid":"104108776","full_name":"occivink/kakoune-phantom-selection","owner":"occivink","description":"Work on multiple selections, one at a time","archived":false,"fork":false,"pushed_at":"2023-10-03T09:17:25.000Z","size":20,"stargazers_count":43,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-07T18:33:41.820Z","etag":null,"topics":["kakoune","plugin","selection"],"latest_commit_sha":null,"homepage":"","language":"KakouneScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/occivink.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}},"created_at":"2017-09-19T17:54:30.000Z","updated_at":"2024-05-22T07:18:18.000Z","dependencies_parsed_at":"2024-04-16T01:45:31.152Z","dependency_job_id":"62e7da56-359c-4971-9823-7b6e8133cb4f","html_url":"https://github.com/occivink/kakoune-phantom-selection","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/occivink%2Fkakoune-phantom-selection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/occivink%2Fkakoune-phantom-selection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/occivink%2Fkakoune-phantom-selection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/occivink%2Fkakoune-phantom-selection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/occivink","download_url":"https://codeload.github.com/occivink/kakoune-phantom-selection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226255396,"owners_count":17595859,"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":["kakoune","plugin","selection"],"created_at":"2024-08-06T18:02:10.341Z","updated_at":"2024-11-25T00:31:29.730Z","avatar_url":"https://github.com/occivink.png","language":"KakouneScript","funding_links":[],"categories":["KakouneScript"],"sub_categories":[],"readme":"# kakoune-phantom-selection\n\n[kakoune](http://kakoune.org) plugin to work on multiple selection one by one. Just a thin wrapper around marks to solve a common use-case.\n\n[![demo](https://asciinema.org/a/152289.png)](https://asciinema.org/a/152289)\n\n## Setup\n\nAdd `phantom-selection.kak` to your autoload dir: `~/.config/kak/autoload/`, or source it manually.\n\n## Usage\n\nWith multiple selections, call `phantom-selection-iterate-next` or `phantom-selection-iterate-prev`. The main selection will remain, and the others will be put in a \"dormant\" state (but still visible). You can then cycle back and forwards by calling these commands again.  \nYou can build the phantom selections using normal kakoune primitives or by calling `phantom-selection-add-selection` to add the current ones. This is useful when the selections you want do not share obvious similarities.  \nFinally, calling `phantom-selection-select-all` will restore all the dormant selection, and `phantom-selection-clear` will remove them instead.  \n\nI personally use the following mappings, since I don't find `select onto` too useful. You can use `user` mode instead of `normal`.\n```\nmap global normal f     \": phantom-selection-add-selection\u003cret\u003e\"\nmap global normal F     \": phantom-selection-select-all; phantom-selection-clear\u003cret\u003e\"\nmap global normal \u003ca-f\u003e \": phantom-selection-iterate-next\u003cret\u003e\"\nmap global normal \u003ca-F\u003e \": phantom-selection-iterate-prev\u003cret\u003e\"\n\n# this would be nice, but currrently doesn't work\n# see https://github.com/mawww/kakoune/issues/1916\n#map global insert \u003ca-f\u003e \"\u003ca-;\u003e: phantom-selection-iterate-next\u003cret\u003e\"\n#map global insert \u003ca-F\u003e \"\u003ca-;\u003e: phantom-selection-iterate-prev\u003cret\u003e\"\n# so instead, have an approximate version that uses 'i'\nmap global insert \u003ca-f\u003e \"\u003cesc\u003e: phantom-selection-iterate-next\u003cret\u003ei\"\nmap global insert \u003ca-F\u003e \"\u003cesc\u003e: phantom-selection-iterate-prev\u003cret\u003ei\"\n```\n\n## Customization\n\nThe script can be modified by changing the value of the face `PhantomSelection` (default `black,green+F`), you probably want to keep the face 'final' by setting the `+F` attribute.\n\n## Tests\n\nThe `test.kak_` file contains tests for the plugin. To execute these tests, simply run `kak -n -e 'source test.kak_ ; quit'`: if the kakoune instance stays open, the tests have somehow failed and the current state can be inspected.\n\n## License\n\nUnlicense\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foccivink%2Fkakoune-phantom-selection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foccivink%2Fkakoune-phantom-selection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foccivink%2Fkakoune-phantom-selection/lists"}