Add command to read file contents into current buffer (vim's :r
)
#3796
Labels
A-helix-term
Area: Helix term improvements
C-enhancement
Category: Improvements
E-good-first-issue
Call for participation: Issues suitable for new contributors
I often use
:r filename.txt
to read a file into the current buffer on vim, but I could't find this feature in helix. There isshell_insert_output
andshell_append_output
which can be used together withcat
to simulate this, but that has the drawback of not supporting things like tab-completion for paths and seems too complicated for such a basic feature.My suggestion would be to either add a
file_insert/append_contents
or even better to use the existing file-picker dialog (<space>-f
) and expand it's functionality with a shortcut to paste in the contents of the selected file, e.g.:<space>-f
<Ctrl>-o
or<Ctrl>-O>
to paste contents of selected file at end/beginning of current buffer (or any other choosen key)Furthermore, the
:r
(or:read
) commands don't exist yet and would therefore not interfere with anything existing, I think it would be good idea to add those.The text was updated successfully, but these errors were encountered: