Tug - Shell Commands for Kakoune


I wanted to share my plugin, tug. It’s a collection of some basic file commands, that act on both buffers and the filesystem, keeping them in sync:

:mv [target] - Move the current file and rename the buffer

:rename [target] - Rename the current file (keeping it in the same directory)

:cp [target] - Copy the current file

:mkdir - Make directories for the current buffer

:chmod [mode] - Change file modes or Access Control Lists

:rm - Remove the current file and buffer

It includes a tmv shell script that can be used within a connect.kak session. It works exactly like mv, but also synchronizes file name changes with any files that may be open in kak buffers.

I hope you find it useful, as I have so far. Of course, let me know if you run into any issues!


The amount of times I’ve reached for these commands expecting them to already be there… Thank you for making this a reality! Installed and will report back if I see anything that could use improvement.

this is great! been looking for exactly this for so long, thank you so much for making it.