portkey
portkey copied to clipboard
Allow Portkey to work with Empty Buffer
When I clear a buffer or end up on an empty buffer, Portkey's commands and mappings stop working.
- Open a buffer with a file in a folder containing Portkey
- Type
:bwipeout - Try a Portkey mapping or
:Eand they won't work
I actually tried to do this at some point while building the plugin, without success.
The problem boils down to the lack of context with an empty Vim buffer. An empty buffer does not have a path. Portkey uses the path of a buffer to locate it's portkey.json and the subsequent patterns in it.
I'm open to any ideas or workarounds. This is something I've also needed a few times.