sveltejs / sites

Monorepo for the sites in the Svelte ecosystem
https://svelte.dev
MIT License
290 stars 123 forks source link

(feat) add vim keybindings to REPL component #501

Closed paoloricciuti closed 1 year ago

paoloricciuti commented 1 year ago

This add support for vim keybings to the REPL component.

A couple of notes:

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hn ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 22, 2023 8:46am
repl ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 22, 2023 8:46am
benmccann commented 1 year ago

I don't know what the other maintainers think, but it seems odd to me to build support for a particular editor's key bindings into the REPL. Will we also have to add support for emacs, nano, VS Code, etc., etc.?

paoloricciuti commented 1 year ago

I don't know what the other maintainers think, but it seems odd to me to build support for a particular editor's key bindings into the REPL. Will we also have to add support for emacs, nano, VS Code, etc., etc.?

That's fair...i think the reason behing this was because vim users are avid keybings users and a lot of people requested the ability to use vim keybindings in the repl (just like it is on learn.svelte.dev)

PuruVJ commented 1 year ago

I don't know what the other maintainers think, but it seems odd to me to build support for a particular editor's key bindings into the REPL. Will we also have to add support for emacs, nano, VS Code, etc., etc.?

Id say that argument is down the drain since rich added vim mode to learn.svelte.dev 😅

dominikg commented 1 year ago

how much weight is this going to add and is there a way to have this as opt-in/lazy loaded feature?

according to bundle-phobia, the codemirror bindings package is 35kb gzip https://bundlephobia.com/package/@replit/codemirror-vim@6.0.14

paoloricciuti commented 1 year ago

how much weight is this going to add and is there a way to have this as opt-in/lazy loaded feature?

according to bundle-phobia, the codemirror bindings package is 35kb gzip https://bundlephobia.com/package/@replit/codemirror-vim@6.0.14

It is lazy loaded