[vim] Use keymap binding instead of event handlers #10101

Closed
marijnh wants to merge 1 commit from github/fork/mightyguava/keymap into master
marijnh commented 2014-11-24 02:11:25 +01:00 (Migrated from gitlab.com)

Revert back to using CodeMirror keymap for key handling instead of direct key handlers.
https://github.com/codemirror/CodeMirror/issues/2915
@heppe please review at your convenience. @nightwing you probably have to add a proxy for the call property on keymaps in ACE github.com/codemirror/CodeMirror@dd2b9d86ac

Revert back to using CodeMirror keymap for key handling instead of direct key handlers. https://github.com/codemirror/CodeMirror/issues/2915 ` @heppe` please review at your convenience.` @nightwing` you probably have to add a proxy for the `call` property on keymaps in ACE https://github.com/codemirror/CodeMirror/commit/dd2b9d86ac30feb74c0bf0b999893382cd9f1e07
marijnh commented 2014-11-24 17:33:33 +01:00 (Migrated from gitlab.com)

can you be more specific here?

can you be more specific here?
marijnh commented 2014-11-24 17:40:57 +01:00 (Migrated from gitlab.com)

why is that a problem?

why is that a problem?
marijnh commented 2014-11-25 04:26:21 +01:00 (Migrated from gitlab.com)

Technically, it's not, but we want to match vim where possible, so I added a TODO to document it.

Technically, it's not, but we want to match vim where possible, so I added a TODO to document it.
marijnh commented 2014-11-25 04:33:17 +01:00 (Migrated from gitlab.com)

Fixed, I was just being lazy.

Fixed, I was just being lazy.
marijnh commented 2014-11-25 18:32:00 +01:00 (Migrated from gitlab.com)

It looks like there's still a bunch of places where the callers are expecting command.

It looks like there's still a bunch of places where the callers are expecting command.
marijnh commented 2014-11-25 18:33:19 +01:00 (Migrated from gitlab.com)

not a new problem, but can you put a log message here into the console? Do we have any mechanism to do that?

not a new problem, but can you put a log message here into the console? Do we have any mechanism to do that?
marijnh commented 2014-11-25 22:20:44 +01:00 (Migrated from gitlab.com)

(If you really want a console.log in production code, write console["log"] to prevent the linter from complaining.)

(If you really want a `console.log` in production code, write `console["log"]` to prevent the linter from complaining.)
marijnh commented 2014-11-27 05:06:14 +01:00 (Migrated from gitlab.com)

I don't understand what you mean by this. findKey is a new function added to use for CodeMirror keymap's call param. handleKey's API has not changed, so there should not be any side effects

I don't understand what you mean by this. `findKey` is a new function added to use for CodeMirror keymap's `call` param. `handleKey`'s API has not changed, so there should not be any side effects
marijnh commented 2014-12-03 08:45:02 +01:00 (Migrated from gitlab.com)

on lines 238 and 635 you are assigning command = findkey(), and then testing against 'function', but findkey is defined as returning true or false.

Or maybe I'm missing something.

on lines 238 and 635 you are assigning command = findkey(), and then testing against 'function', but findkey is defined as returning true or false. Or maybe I'm missing something.
marijnh commented 2014-12-04 04:02:06 +01:00 (Migrated from gitlab.com)

Ah, the documentation is out of date. Updated.

Ah, the documentation is out of date. Updated.
marijnh commented 2014-12-06 19:31:30 +01:00 (Migrated from gitlab.com)

Merged as 4fad3f8

Merged as 4fad3f8
marijnh (Migrated from gitlab.com) closed this pull request 2014-12-06 19:31:30 +01:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/codemirror5!10101
No description provided.