Closed
Bug 941725
Opened 12 years ago
Closed 12 years ago
Add emacs and vim key bindings to source editor
Categories
(DevTools :: Source Editor, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 29
People
(Reporter: fitzgen, Assigned: anton)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 3 obsolete files)
260.62 KB,
patch
|
anton
:
review+
|
Details | Diff | Splinter Review |
Would be cool if we had a dropdown in the options panel to choose different keybinding styles for inside the source editor. Specifically, one of those should be emacs style keybindings. Should be easy since there's a mode/plugin/something for code mirror, right?
Reporter | ||
Updated•12 years ago
|
Priority: -- → P2
Reporter | ||
Comment 2•12 years ago
|
||
(In reply to Anton Kovalyov (:anton, @valueof) from comment #1)
> This is not P2 at all.
It is assigned, therefore P2. And you said it would take like five minutes last night.
Priority: P3 → P2
Reporter | ||
Updated•12 years ago
|
Assignee: nobody → anton
Comment 3•12 years ago
|
||
All you need to do is plop this bad boy in: https://github.com/marijnh/CodeMirror/blob/master/keymap/emacs.js.
Assignee | ||
Updated•12 years ago
|
Assignee: anton → nobody
Priority: P2 → P3
Updated•12 years ago
|
Assignee: nobody → gabriel.luong
Updated•12 years ago
|
Assignee: gabriel.luong → nobody
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → anton
Assignee | ||
Updated•12 years ago
|
Summary: Add emacs key bindings to source editor → Add emacs and vim key bindings to source editor
Assignee | ||
Comment 4•12 years ago
|
||
This patch adds Emacs and VIM keymaps to our source editor. Since CodeMirror architecture is obviously different from both Emacs and VIM, the support is approximate.
I also added a new event, save, that is triggered whenever a save command is called. In VIM mode it is with :w so you get this kind of interaction: http://vimeo.com/83533549
Reviews: benvie for scratchpad, mihai for sourceeditor and harth for styleeditor changes.
Attachment #8356249 -
Flags: review?(mihai.sucan)
Attachment #8356249 -
Flags: review?(fayearthur)
Attachment #8356249 -
Flags: review?(bbenvie)
Comment 5•12 years ago
|
||
Comment on attachment 8356249 [details] [diff] [review]
WIP 1
Review of attachment 8356249 [details] [diff] [review]:
-----------------------------------------------------------------
r=me for style editor change.
Attachment #8356249 -
Flags: review?(fayearthur) → review+
Assignee | ||
Comment 6•12 years ago
|
||
Rebased with the current fx-team and added keymap/ files to codemirror/README. Carrying over harth's r+.
Attachment #8356249 -
Attachment is obsolete: true
Attachment #8356249 -
Flags: review?(mihai.sucan)
Attachment #8356249 -
Flags: review?(bbenvie)
Attachment #8356268 -
Flags: review?(mihai.sucan)
Attachment #8356268 -
Flags: review?(bbenvie)
Comment 7•12 years ago
|
||
Comment on attachment 8356268 [details] [diff] [review]
WIP 2
Review of attachment 8356268 [details] [diff] [review]:
-----------------------------------------------------------------
Scratchpad changes LGTM.
Attachment #8356268 -
Flags: review?(bbenvie) → review+
Comment 8•12 years ago
|
||
Comment on attachment 8356268 [details] [diff] [review]
WIP 2
Review of attachment 8356268 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM and I am glad to see vim mode. I like that - it seems good enough.
Attachment #8356268 -
Flags: review?(mihai.sucan) → review+
Comment 9•12 years ago
|
||
Do you plan to add some tests for these new key maps?
Assignee | ||
Comment 10•12 years ago
|
||
> Do you plan to add some tests for these new key maps?
Good point. CodeMirror has its own tests for both VIM and Emacs bindings. I will add them to this patch and then will figure out the way to integration test this.
Assignee | ||
Comment 11•12 years ago
|
||
Added CM tests for both Emacs and VIM mode. Since this adds a lot of new tests, running a Try to make sure we're not timing out on Linux machines: https://tbpl.mozilla.org/?tree=Try&rev=4a9d3d89279a
Carrying over r+ from harth, benvie and msucan.
Attachment #8356268 -
Attachment is obsolete: true
Attachment #8356693 -
Flags: review+
Assignee | ||
Comment 12•12 years ago
|
||
Whiteboard: [fixed-in-fx-team]
Comment 13•12 years ago
|
||
Will this feature also be available in Nightly for windows?
Or it's for Mac OS X only?
Assignee | ||
Comment 14•12 years ago
|
||
It is available on all platforms.
Assignee | ||
Comment 15•12 years ago
|
||
This was landed in m-c by the way.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 16•12 years ago
|
||
Actually, I can't find it in m-c. Was it ever merged or backed out?
Status: RESOLVED → REOPENED
Flags: needinfo?(kwierso)
Resolution: FIXED → ---
Assignee | ||
Comment 17•12 years ago
|
||
Nvm, seems like it was backed out here: https://github.com/mozilla/gecko-dev/commit/43291099f8264f6782f42a25fc5208c036e695f7
Flags: needinfo?(kwierso)
Yeah, looks like this was backed out in https://hg.mozilla.org/integration/fx-team/rev/ad44a7aa67e1 but that comment never ended up here.
Whiteboard: [fixed-in-fx-team]
Assignee | ||
Comment 19•12 years ago
|
||
Landing again, with VIM/Emacs addon tests disabled: https://hg.mozilla.org/integration/fx-team/rev/c15cacb7efd6 They will be re-enabled once we split codemirror.html into multiples. (At this point we have to.)
Whiteboard: [fixed-in-fx-team]
Comment 20•12 years ago
|
||
Sorry, backed out because of CodeMirror test failures again:
https://hg.mozilla.org/integration/fx-team/rev/31f20a54082f
https://tbpl.mozilla.org/?tree=Fx-Team&rev=c15cacb7efd6
Whiteboard: [fixed-in-fx-team]
Assignee | ||
Comment 21•12 years ago
|
||
So, I split CodeMirror test suite into two: one for all basic tests, another for VIM/Emacs modes only. It seems to be running well on my machine, pushing to Try and if it's green going to land this tomorrow. Again.
https://tbpl.mozilla.org/?tree=Try&rev=b11f1947ca30
Attachment #8356693 -
Attachment is obsolete: true
Attachment #8360174 -
Flags: review+
Assignee | ||
Comment 22•12 years ago
|
||
Ok, third attempt. Try seemed to be green.
https://hg.mozilla.org/integration/fx-team/rev/fd0dafa0e8db
Whiteboard: [fixed-in-fx-team]
Comment 23•12 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 29
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•