Vim editor ported to WebAssembly
fetchFiles
option was added. It can define mapping from Vim's filesystem to external resources (file path or URL). Vim fetches the resources just before starting Vim and maps them to its filesystem entriesjsevalfunc()
Vim script function to evaluate JavaScript code in Vim script. The function makes it easier to integrate browser API into Vim pluginhas('gui_wasm')
returns 1
in Vim scriptFunction
to evaluate JavaScript codevim-wasm/small
directoryworkerScriptPath
optionVIM_FEATURE
constant was removed because the npm package now provides multiple featuresworkerScriptPath
option of constructor of VimWasm
is now not optional because almost all case default value is not available.system()
)desert
to onedark
. monokai
was also addedvim.data
:!
can evaluate JavaScript file like :!/path/to/file.js
. JavaScript file is evaluated in main thread. When it caused an error, the error message is output in Vim message areaVimWasm.showError
method to output error message in Vim from JavaScript sideVIM_VERSION
and VIM_FEATURE
constants are added to ES Module to get Vim version and feature set namecmdArgs
option to VimWasm.start()
method call. It defines a command line arguments for running vim
command. Please read documentation for more detailsarg=
query parameter to pass command line arguments to underlying vim
command executionVimWasm.start()
. Now vimrc of https://rhysd.github.io/vim.wasm is persistent
files
: Create files before Vim startsdirs
: Create directories before Vim startspersistentDirs
: Mark directories persistent. They are stored on Indexed DB as persistent storagecheckBrowserCompatibility()
to check vim.wasm is availableonVimExit
callback is tweaked. It is now called after Vim completely exited:export
error handling. Now error message is correct\
key event bug on Chromiumguifont
option (e.g. set guifont=Monaco:h12
sets Monaco font with 12px height)