Graphql-playground: VIM mode would be very nice

Created on 18 Jul 2018  路  5Comments  路  Source: graphql/graphql-playground

This issue pertains to the following package(s):

  • [ ] GraphQL Playground - Electron App
  • [*] GraphQL Playground HTML
  • [ ] GraphQL Playground
  • [ ] GraphQL Playground Express Middleware
  • [ ] GraphQL Playground Hapi Middleware
  • [ ] GraphQL Playground Koa Middleware
  • [ ] GraphQL Playground Lambda Middleware

What OS and OS version are you experiencing the issue(s) on?

Mac OSX High Sierra (v10.13.5)

What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?

1.6.0 ? (whatever is bundled in apollo-server-express)

What is the expected behavior?

Expecting to enable VIM mode somehow

What is the actual behavior?

No VIM mode :(

What steps may we take to reproduce the behavior?

n/a, but @nilan mentioned one should open an issue here to request it be re-added 馃

_Please provide a gif or image of the issue for a quicker response/fix._

rf0-needs-spec

Most helpful comment

Has anyone been able to make any progress on this? It was fairly simple to add an editor setting to enable vim as you can see from my changes here.

Instead of the explicit vim mode toggle in the linked commit in @mcabrams' comment, I introduce a generic "editor.keyMap" setting, which can have values "vim", "emacs", or the default "sublime".

It's usable (at least for me) but I wouldn't consider it complete, since for some reason the cursor doesn't appear in the light theme and pressing the escape key occasionally doesn't exit insert mode to normal mode (and I haven't really tested emacs mode).

All 5 comments

@marktani you said here that it was removed in an earlier refactor: https://www.prisma.io/forum/t/vim-in-graphql-playground-electron/3007

Can you let us know in which commit, and / or where in the code, or otherwise give some pointers so we don't reinvent the wheel?

Thanks!

@christianrondeau here's where it was added: https://github.com/prisma/graphql-playground/commit/0138105967e7f009dde79c49cc0a0a2beb33f29a - should be enough to get started/use some git fu to find where it was removed.

Any updates on adding this feature? Some basic Vim functionality would be Amazing.

@fandy still on my todo list, but I didn't find time yet. If someone tackles it let us know, I'll reach out if I have something working in the future!

Has anyone been able to make any progress on this? It was fairly simple to add an editor setting to enable vim as you can see from my changes here.

Instead of the explicit vim mode toggle in the linked commit in @mcabrams' comment, I introduce a generic "editor.keyMap" setting, which can have values "vim", "emacs", or the default "sublime".

It's usable (at least for me) but I wouldn't consider it complete, since for some reason the cursor doesn't appear in the light theme and pressing the escape key occasionally doesn't exit insert mode to normal mode (and I haven't really tested emacs mode).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jazzzz picture jazzzz  路  38Comments

freddy311082 picture freddy311082  路  14Comments

schickling picture schickling  路  52Comments

Deepaknathtiwari picture Deepaknathtiwari  路  11Comments

anodynos picture anodynos  路  19Comments