{"action":"created","issue":{"url":"https://api.github.com/repos/google/xi-editor/issues/302","repository_url":"https://api.github.com/repos/google/xi-editor","labels_url":"https://api.github.com/repos/google/xi-editor/issues/302/labels{/name}","comments_url":"https://api.github.com/repos/google/xi-editor/issues/302/comments","events_url":"https://api.github.com/repos/google/xi-editor/issues/302/events","html_url":"https://github.com/google/xi-editor/issues/302","id":229520468,"number":302,"title":"key bindings + modal editing (vim) discussion","user":{"login":"cmyr","id":3330916,"avatar_url":"https://avatars2.githubusercontent.com/u/3330916?v=4","gravatar_id":"","url":"https://api.github.com/users/cmyr","html_url":"https://github.com/cmyr","followers_url":"https://api.github.com/users/cmyr/followers","following_url":"https://api.github.com/users/cmyr/following{/other_user}","gists_url":"https://api.github.com/users/cmyr/gists{/gist_id}","starred_url":"https://api.github.com/users/cmyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmyr/subscriptions","organizations_url":"https://api.github.com/users/cmyr/orgs","repos_url":"https://api.github.com/users/cmyr/repos","events_url":"https://api.github.com/users/cmyr/events{/privacy}","received_events_url":"https://api.github.com/users/cmyr/received_events","type":"User","site_admin":false},"labels":[{"id":607996947,"url":"https://api.github.com/repos/google/xi-editor/labels/discussion","name":"discussion","color":"a379c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":34,"created_at":"2017-05-18T00:07:39Z","updated_at":"2017-11-04T05:11:33Z","closed_at":null,"author_association":"COLLABORATOR","body":"I want to capture some stuff from IRC earlier today, about approaches to vim-mode/modal editing more generally. The kindling question was from @theduke, who asked, _should the core have a concept of key bindings?_\r\n\r\nThe more general question is: how should key bindings be handled, and what is the division of labour between core and client, here?\r\n\r\nSome general take-aways:\r\n\r\n- _How important is lossless vim emulation, versus enabling **vim-like** functionality_? For instance: Vim does not let you navigate to the position after the last character on a line. These feels like a hangover from the hardware terminal days. Is this desired behaviour?\r\n\r\n- _vim mode_ is itself less important than general 'modal' support, which could be implemented by a state machine that exists in core, consuming raw key events and outputting editor events.\r\n\r\n- This feature should exist alongside the current system for handling events; the user would be able to opt-in via some setting.\r\n\r\n- The client should (could) have some flag that toggles between `raw_input` and `selector` mode; this flag might be set by core in the course of editting; when in `raw_mode` the client would be expected to just send raw keystrokes. `selector` mode would maintain the current behaviour.\r\n\r\n- integration with [IME](https://en.wikipedia.org/wiki/Input_method) is tricky, because the client needs to know the core mode in order to correctly dispatch keypresses. For instance (with future vim emulation enabled, and the editor in command mode) if we type `ika<return>` on a japanese input method, we would want `i` to be interpreted as 'insert mode', and `ka` to be passed through to the input method for 'か'. Does this mean that keypresses have to be sync? Some subset of keypresses? Should there be some other mechanism?\r\n\r\n- this gets to be more fun if you're in 'replace' mode.\r\n\r\n- The lazy option is to not support IME when using the editor modally.\r\n\r\n- This raises the larger question of what is the role of core, and what is the role of the client. Contributors who have been more heavily involved in writing clients (@sp3d, @eyelash) are more skeptical of whether core can offer a good solution here.\r\n\r\n\r\nIf anyone thinks I missed anything or has anything else to add, let me know. 😄 \r\n\r\nrelevant: #93 #291 \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/google/xi-editor/issues/comments/341872902","html_url":"https://github.com/google/xi-editor/issues/302#issuecomment-341872902","issue_url":"https://api.github.com/repos/google/xi-editor/issues/302","id":341872902,"user":{"login":"zacps","id":9827696,"avatar_url":"https://avatars3.githubusercontent.com/u/9827696?v=4","gravatar_id":"","url":"https://api.github.com/users/zacps","html_url":"https://github.com/zacps","followers_url":"https://api.github.com/users/zacps/followers","following_url":"https://api.github.com/users/zacps/following{/other_user}","gists_url":"https://api.github.com/users/zacps/gists{/gist_id}","starred_url":"https://api.github.com/users/zacps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zacps/subscriptions","organizations_url":"https://api.github.com/users/zacps/orgs","repos_url":"https://api.github.com/users/zacps/repos","events_url":"https://api.github.com/users/zacps/events{/privacy}","received_events_url":"https://api.github.com/users/zacps/received_events","type":"User","site_admin":false},"created_at":"2017-11-04T05:11:33Z","updated_at":"2017-11-04T05:11:33Z","author_association":"NONE","body":"@cmyr I'd be interested in working on this once there's a consensus on how to best do it."}}
{"actor":{"display_login":"zacps"}}