6

Google Chrome now supports using the CodeMirror editor instead of its old editor in developer tools. You can turn it on by going to developer tools settings and checking “use code mirror editor”.

While this is very cool, I would like to use it with a certain keymap, specifically the vim one, which Code Mirror supports. I am wondering whether there is a way to hack it to load vim.js into the developer tools context. I have tried looking in the folder where Chrome is installed on my machine, but I could not find where it does its thing.

Apparently, Chrome loads the CodeMirror stuff from chrome-devtools://devtools/CodeMirrorTextEditor.js, which seems to come from the resources.pak file in the Chrome install directory, but making changes to that file does not seem to have an effect. Maybe I am not refreshing things property, or maybe you’re not supposed to edit the pak file directly.

TRiG
  • 10,148
  • 7
  • 57
  • 107
bad_dragon
  • 61
  • 4
  • there's no way to 'hack' it, you'd have to alter the sources and recompile chromium for that – Eliran Malka Aug 07 '13 at 10:17
  • 2
    There's actually a way to use custom DevTools front-end for debugging via the combination of chrome runtime flags `--remote-debugging-port` and `--remote-debugging-frontend`. This way you'll still need to hack on DevTools sources, but you'll avoid checking out and compiling the whole chromium project - this takes *a lot*. More on this could be found here: https://medium.com/p/8c8896f5cef3 – Andrey Lushnikov Nov 15 '13 at 10:23

0 Answers0