Coder Social home page Coder Social logo

Comments (6)

rhysd avatar rhysd commented on June 22, 2024 3

I agree. But vim.wasm is not in the phase for now. I'm now trying to fix/improve base implementations to make vim.wasm run faster/more robustly. I want to extend fundamental features like :write you're pointing after current fixes are done.
Anyway, thank you for reporting this. To keep your idea in my mind, I'll label this issue as 'enhancement'.

from vim.wasm.

rhysd avatar rhysd commented on June 22, 2024 2

Here is a screenshot.

tmp

from vim.wasm.

Ph4us avatar Ph4us commented on June 22, 2024

i was going to ask something like this, so my question is how can i get what i write?, i mean if i want to use what i write for an API, for example

from vim.wasm.

rhysd avatar rhysd commented on June 22, 2024

Possible implementation would be:

  1. Implement a JavaScript function which is supposed to be called at writing a file. In the function, we can show dialog or do something.
  2. In C, :write is implemented in do_write() function of ex_cmds.c. Call above JavaScript function in do_write() with the file name and the buffer content

from vim.wasm.

rhysd avatar rhysd commented on June 22, 2024

After some thoughts, I implemented :export special command to download current buffer or specific file at 4c81d4c.

I did not hook :write because browser does not overwrite existing file (e.g. when downloading foo.txt twice, foo (1).txt is downloaded at second time). Each :write generates a new file and it would be annoying.

from vim.wasm.

Lonami avatar Lonami commented on June 22, 2024

Cool, good job!

from vim.wasm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.