Chimera Linux actually uses apk or Alpine Package Keeper as its package manager, they acknowledge this but despite that market themselves as if they did something revolutionary that has never been done before
Chimera Linux actually uses apk or Alpine Package Keeper as its package manager, they acknowledge this but despite that market themselves as if they did something revolutionary that has never been done before
what about autocmd on DirChanged or VimEnter that sets the option?
You can wrap the call in pcall, which is a lua builtin for catching errors, which would suppress the error and let you know if the command failed.
You could for example do:
local ok, res = pcall(vim.cmd.write)
if not ok
then
vim.notify('write failed with: ' .. res)
end
There are both lua and vim functions for writing to files but I recommend to not use them in this scenario, they write to the file directly and dont trigger autocommands.
I understand your frustration with no consitent error reporting and clear api, but I guess that’s the consequence of the entire history of vi and vim and trying to be backwards compatible.
vim.cmd.<command>
calls a command. So vim.cmd.write
is effectively the same as :write
, the arguments passed to the function are the same that the command would take. Check :h vim.cmd()
and for a specific command, e.g. write, you can check :h :write
.
You can call commands and vim functions from lua. To write the current buffer you can: vim.cmd.write()
. Vim functions can be called with vim.fn
.
It is completely fine to use vim functiona and not just pure lua, afaik some vim functions are not ever gonna get a lua alternative cause there is no need.
Just use Alpine. Chimera uses Alpine’s package manager anyway. The only reason you havent heard about Alpine in this context is because they do not claim they are doing anything revolutionary, they just strive to make a great distro.