Hacky script to "send a file to (n)vim"
- install flask v2.x globally
- git clone this to
$HOME
- add the following line to
.vimrc
:
:command FileRecv execute '!$HOME/nvim-FileRecv/run.sh "%"' | r!tail -1 /tmp/nvim-file-recv
When you type :FileRecv
in vim,
- a very simple file upload website (Flask server) will begin running on
0.0.0.0:8000
- once a file is manually uploaded on that site, the server will shutdown
- the uploaded file will be saved to the directory containing the current open file, and the path to that file will be dumped in the current buffer
I have extensively used all of the aforementioned solutions. This solution is more ergonomic/efficient, even if hacky.
I don't know how to host a HTTP server in that.
Highly so.
works on my machine
I have not; please send it my way!