|
4 | 4 | "assignees": [],
|
5 | 5 | "author_association": "NONE",
|
6 | 6 | "body": "### Feature already in Vim?\r\n\r\nNot that I know of\r\n\r\n### Feature description\r\n\r\n# Motivation\r\nWith the advent of floating windows I found myself yearning for the ability to set window-local mappings.\r\nI am aware of buffer-local mappings, i.e `nnoremap <buffer> q :q<CR>` but window-local mappings would provide an extra layer of control.\r\nIf I happen to open a floating window that has the same buffer as another already existing non-floating window, I am currently not able to set different mappings for each of the windows, and while there are workarounds, this feature would make it more straightforward.\r\n\r\n# Desired feature:\r\n`:nnoremap <window> q :q<CR>`\r\n\r\n## Behaviour\r\nSetting a window-local mapping would behave exactly like `<buffer>` but window-bound instead of buffer-bound.\r\nI imagine the precedence being `buffer > window > global`.\r\n\r\n## Use-case\r\nhttps://github.com/rmagatti/goto-preview/issues/7\r\nIn this use-case one wants to map `q` for closing preview (floating) window instead of triggering a macro recording through a provided hook function for when a preview window is opened, but if that floating window ends up having the same buffer as the main window, the mapping is also applied there.\r\n\r\n### Showcase\r\n#### Current behaviour\r\n\r\n```lua\r\nrequire('goto-preview').setup {\r\n post_open_hook = function()\r\n vim.cmd[[nnoremap <buffer> q :q<CR>]]\r\n end\r\n}\r\n```\r\n\r\n\r\n#### Desired behaviour (simulated by previewing a separate buffer)\r\n\r\n```lua\r\nrequire('goto-preview').setup {\r\n post_open_hook = function()\r\n vim.cmd[[nnoremap <window> q :q<CR>]]\r\n end\r\n}\r\n```\r\n\r\n",
|
7 |
| - "closed_at": null, |
8 |
| - "closed_by": null, |
| 7 | + "closed_at": "2025-02-21T00:26:14Z", |
| 8 | + "closed_by": { |
| 9 | + "avatar_url": "https://avatars.githubusercontent.com/u/1359421?v=4", |
| 10 | + "events_url": "https://api.github.com/users/justinmk/events{/privacy}", |
| 11 | + "followers_url": "https://api.github.com/users/justinmk/followers", |
| 12 | + "following_url": "https://api.github.com/users/justinmk/following{/other_user}", |
| 13 | + "gists_url": "https://api.github.com/users/justinmk/gists{/gist_id}", |
| 14 | + "gravatar_id": "", |
| 15 | + "html_url": "https://github.com/justinmk", |
| 16 | + "id": 1359421, |
| 17 | + "login": "justinmk", |
| 18 | + "node_id": "MDQ6VXNlcjEzNTk0MjE=", |
| 19 | + "organizations_url": "https://api.github.com/users/justinmk/orgs", |
| 20 | + "received_events_url": "https://api.github.com/users/justinmk/received_events", |
| 21 | + "repos_url": "https://api.github.com/users/justinmk/repos", |
| 22 | + "site_admin": false, |
| 23 | + "starred_url": "https://api.github.com/users/justinmk/starred{/owner}{/repo}", |
| 24 | + "subscriptions_url": "https://api.github.com/users/justinmk/subscriptions", |
| 25 | + "type": "User", |
| 26 | + "url": "https://api.github.com/users/justinmk", |
| 27 | + "user_view_type": "public" |
| 28 | + }, |
9 | 29 | "comment_data": [
|
10 | 30 | {
|
11 | 31 | "author_association": "CONTRIBUTOR",
|
|
366 | 386 | "url": "https://api.github.com/users/clason",
|
367 | 387 | "user_view_type": "public"
|
368 | 388 | }
|
| 389 | + }, |
| 390 | + { |
| 391 | + "author_association": "MEMBER", |
| 392 | + "body": "Tracked in https://github.com/neovim/neovim/issues/992#issuecomment-2577779050", |
| 393 | + "created_at": "2025-02-21T00:26:14Z", |
| 394 | + "html_url": "https://github.com/neovim/neovim/issues/16263#issuecomment-2673025374", |
| 395 | + "id": 2673025374, |
| 396 | + "issue_url": "https://api.github.com/repos/neovim/neovim/issues/16263", |
| 397 | + "node_id": "IC_kwDOAPphoM6fUyFe", |
| 398 | + "performed_via_github_app": null, |
| 399 | + "reactions": { |
| 400 | + "+1": 0, |
| 401 | + "-1": 0, |
| 402 | + "confused": 0, |
| 403 | + "eyes": 0, |
| 404 | + "heart": 0, |
| 405 | + "hooray": 0, |
| 406 | + "laugh": 0, |
| 407 | + "rocket": 0, |
| 408 | + "total_count": 0, |
| 409 | + "url": "https://api.github.com/repos/neovim/neovim/issues/comments/2673025374/reactions" |
| 410 | + }, |
| 411 | + "updated_at": "2025-02-21T00:26:14Z", |
| 412 | + "url": "https://api.github.com/repos/neovim/neovim/issues/comments/2673025374", |
| 413 | + "user": { |
| 414 | + "avatar_url": "https://avatars.githubusercontent.com/u/1359421?v=4", |
| 415 | + "events_url": "https://api.github.com/users/justinmk/events{/privacy}", |
| 416 | + "followers_url": "https://api.github.com/users/justinmk/followers", |
| 417 | + "following_url": "https://api.github.com/users/justinmk/following{/other_user}", |
| 418 | + "gists_url": "https://api.github.com/users/justinmk/gists{/gist_id}", |
| 419 | + "gravatar_id": "", |
| 420 | + "html_url": "https://github.com/justinmk", |
| 421 | + "id": 1359421, |
| 422 | + "login": "justinmk", |
| 423 | + "node_id": "MDQ6VXNlcjEzNTk0MjE=", |
| 424 | + "organizations_url": "https://api.github.com/users/justinmk/orgs", |
| 425 | + "received_events_url": "https://api.github.com/users/justinmk/received_events", |
| 426 | + "repos_url": "https://api.github.com/users/justinmk/repos", |
| 427 | + "site_admin": false, |
| 428 | + "starred_url": "https://api.github.com/users/justinmk/starred{/owner}{/repo}", |
| 429 | + "subscriptions_url": "https://api.github.com/users/justinmk/subscriptions", |
| 430 | + "type": "User", |
| 431 | + "url": "https://api.github.com/users/justinmk", |
| 432 | + "user_view_type": "public" |
| 433 | + } |
369 | 434 | }
|
370 | 435 | ],
|
371 |
| - "comments": 8, |
| 436 | + "comments": 9, |
372 | 437 | "comments_url": "https://api.github.com/repos/neovim/neovim/issues/16263/comments",
|
373 | 438 | "created_at": "2021-11-08T09:06:37Z",
|
374 | 439 | "events_url": "https://api.github.com/repos/neovim/neovim/issues/16263/events",
|
|
422 | 487 | "url": "https://api.github.com/repos/neovim/neovim/issues/16263/reactions"
|
423 | 488 | },
|
424 | 489 | "repository_url": "https://api.github.com/repos/neovim/neovim",
|
425 |
| - "state": "open", |
426 |
| - "state_reason": null, |
| 490 | + "state": "closed", |
| 491 | + "state_reason": "duplicate", |
427 | 492 | "sub_issues_summary": {
|
428 | 493 | "completed": 0,
|
429 | 494 | "percent_completed": 0,
|
430 | 495 | "total": 0
|
431 | 496 | },
|
432 | 497 | "timeline_url": "https://api.github.com/repos/neovim/neovim/issues/16263/timeline",
|
433 | 498 | "title": "Add ability to set window-local mappings",
|
434 |
| - "updated_at": "2025-01-17T15:59:30Z", |
| 499 | + "updated_at": "2025-02-21T00:26:15Z", |
435 | 500 | "url": "https://api.github.com/repos/neovim/neovim/issues/16263",
|
436 | 501 | "user": {
|
437 | 502 | "avatar_url": "https://avatars.githubusercontent.com/u/2881382?v=4",
|
|
0 commit comments