I’ve been trying to integrate Kakoune with nnn the last little bit, to try to achieve something similar to vim + vim-vinegar + netrw. In other words, I would like to hit
- to enter
nnn in the parent directory for the active buffer, select a file using
nnn, and have it put me back into
kakoune with the current buffer set to the selected file from
nnn, and close
nnn. Preferably I would like this to all happen in the same window.
I believe this is possible using
nnn -p -, which from here I gather will use
nnn as a selector and output the results to
stdout. I’ve seen other people on this forum asking how to achieve something similar, and have been directed to look into
connect.kak. I’ve looked into this, and have figured out how to open it in another window (currently kitty, I’m also in the middle of configuring
:terminal to open a new i3 window), but it does not close after having selected a file and seems to be leveraging a workflow around
VISUAL=edit and setting up the edit command to open a file in the current kakoune session. I understand how useful/powerful that can be in a lot of contexts, but it seems like it shouldn’t be necessary for this because
nnn already provides a way to output a file to
stdout, and I would like to run this all in the current window.
I think my unix-fu is just lacking (long time linux user - long time bash avoider), I’d really appreciate if someone more skilled in this area could provide some guidance.
Thanks in advance!!