Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt to implement #3796.
It is an alternative implementation to #3966 using a lot of the "paste" functionality that was already available (for better or worse). I elected to read the file "raw" without going through the Document infrastructure as eventually it was being read directly into a String and, because it reuses the
paste_impl
function already, decided to skip the overhead of processing the document first. Oh and as a bonus it supports multiple files.The command has been implemented as:
file-paste-after
andfile-paste-before
... to keep it in line with the current
:*-paste-[before|after|replace]
commands.It does have basic file picker integration (which I am the most iffy with - comments/fixes expected and welcome!), using what seemed to be the easiest path - through the
Actions
enum. In particular, I'm looking for any suggestions as to what should happen inhelix-view/src/editor.rs
. It's not currently hit in any path so I've left it as a noop for now. Not great, but I just wanted something up for comments.Beginning with rust so any code suggestions/critiques/guidance welcome. Additionally, any insight as to how to get
c-O
to work in the picker would be great 😄