vim-maktaba
vim-maktaba copied to clipboard
Consistent Vimscript
We now have a `maktaba#syscall` API for making system calls using a builder pattern that deprecates the `maktaba#system` API (which has a messier cross product of options upfront). We should...
If a plugin wants to have configuration based on a buffer's filetype, it turns out to be tricky to handle if you need to explicitly handle the case where filetype...
Maktaba has a suite of `maktaba#ensure#` functions for throwing errors whenever certain conditions aren't satisfied. For instance: ``` VimL call maktaba#ensure#IsTrue(g:foo) call maktaba#ensure#IsEqual(5, g:foo) call maktaba#ensure#IsIn(g:foo, [1, 2, 3]) call...
Currently, `maktaba#ensure#Passes` has no way to pass a custom message in, and can only every give you the very vague message `E605: Exception not caught: ERROR(BadValue): SOMEVALUE failed to pass...
Maktaba as a plugin framework should allow plugins to register/init themselves via maktaba without side effects like modifying runtimepath that should generally be left up to plugin managers. This change...
We have `maktaba#plugin#Install` to install a plugin on the runtimepath and register it with maktaba. But that's a fairly heavy operation that should usually be left to plugin managers, and...
Calling `maktaba#plugin#Install('nonexistent/path/')` to install nonexistent plugin paths actually succeeds, registering and returning a plugin object: ``` :echo maktaba#plugin#Install('nonexistent/path/') {'HasDir': function('maktaba#plugin#HasDir'), 'flags': {}, …} :echo maktaba#plugin#IsRegistered('path') 1 ``` Seems like it...
Vim's command completion interface is fine for simple commands, but pretty awkward for more complex commands like :Glaive that can't necessarily base completion just on `ArgLead` (the last partial arg...
Maktaba includes a few performance-critical functions like `maktaba#rtp#Add` that we try to optimize with caching, etc., but we somehow completely broke the caching at some point and didn't notice. We...
`maktaba#path#GetDirectory` treats nonexistent paths as directories: ``` VimL echo maktaba#path#GetDirectory('foo/bar/NONEXISTENT') " --> foo/bar/NONEXISTENT/ ``` Originally we had a variant that assumed files, not directories, but that was deleted. I would...