# Tree.kak

**URL:** <https://discuss.kakoune.com/t/tree-kak/2882>\
**Category:** Plugins\
**Created:** [April 30, 2026, 5:27pm UTC](https://discuss.kakoune.com/t/tree-kak/2882 "2026-04-30T17:27:00Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmafeni04](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/kmafeni04/32/1627_2.png) [@kmafeni04](https://discuss.kakoune.com/u/kmafeni04)\
**Post date:** [April 30, 2026, 5:27pm UTC](https://discuss.kakoune.com/t/tree-kak/2882/1 "2026-04-30T17:27:00Z")

</div>

Another filetree plugin  
[https://github.com/kmafeni04/tree.kak](https://github.com/kmafeni04/tree.kak)

 ![image](https://discuss.kakoune.com/uploads/default/original/2X/5/55284fed7c4f37f42ffeb95183bf7d56982f8274.png)

---

<div class="post-metadata">

**Author:** ![AJChapman](https://discuss.kakoune.com/letter_avatar_proxy/v4/letter/a/dfb087/32.png) [@AJChapman](https://discuss.kakoune.com/u/AJChapman)\
**Post date:** [May 5, 2026, 12:30am UTC](https://discuss.kakoune.com/t/tree-kak/2882/2 "2026-05-05T00:30:05Z")

</div>

The implementation looks nice and simple. How does it compare to the other filetree plugins available? Unfortunately the preview video isn’t working for me.

---

<div class="post-metadata">

**Author:** ![srazkvt](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/srazkvt/32/1548_2.png) [@srazkvt](https://discuss.kakoune.com/u/srazkvt)\
**Post date:** [May 5, 2026, 11:15am UTC](https://discuss.kakoune.com/t/tree-kak/2882/3 "2026-05-05T11:15:22Z")

</div>

Honestly that’s neat, i prefer using an external file manager (currently `nnn`) though, as they are completely separate and don’t rely on the editor at all, just with an `OPENER` env variable which i can set to a `kak_open` command i wrote, and can therefore be used with other tools as well, not just the text editor

still, looks neat

---

<div class="post-metadata">

**Author:** ![kmafeni04](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/kmafeni04/32/1627_2.png) [@kmafeni04](https://discuss.kakoune.com/u/kmafeni04)\
**Post date:** [May 5, 2026, 11:48am UTC](https://discuss.kakoune.com/t/tree-kak/2882/4 "2026-05-05T11:48:18Z")

</div>

> [@AJChapman](#):
>
> How does it compare to the other filetree plugins available?

- A plugin that the keybindings were reconfigureable, kaktree for example has set keybindings that you’re not meant to change, I only have a suggested keymap.
- A plugin to not change the root directory of kakoune when you change directory in the filetree which kaktree also did.
- I wanted everything to be done in shell and be simple to read
- Finally, I want to come up with a way to make it extensible so people can externally script onto it.

Those are the general goals

> [@AJChapman](#):
>
> Unfortunately the preview video isn’t working for me.

~~It works on chromium based browser but nowhere else, not sure what the issue is~~  
Scratch that, opened in librewolf and it’s working fine

 ![image](https://discuss.kakoune.com/uploads/default/original/2X/1/1eadf0868d47ded216a3c1dcfb1ecf55acc72c42.jpeg)

---

<div class="post-metadata">

**Author:** ![kmafeni04](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/kmafeni04/32/1627_2.png) [@kmafeni04](https://discuss.kakoune.com/u/kmafeni04)\
**Post date:** [May 5, 2026, 11:49am UTC](https://discuss.kakoune.com/t/tree-kak/2882/5 "2026-05-05T11:49:35Z")

</div>

I get that, I was using lf as my own filetree before but thought it would be an interesting exercise to make something “builtin.” Now I prefer this implementation and use it everyday

---

<div class="post-metadata">

**Author:** ![srazkvt](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/srazkvt/32/1548_2.png) [@srazkvt](https://discuss.kakoune.com/u/srazkvt)\
**Post date:** [May 5, 2026, 5:46pm UTC](https://discuss.kakoune.com/t/tree-kak/2882/6 "2026-05-05T17:46:26Z")

</div>

very fair, it’s always cool to see how different people work even though we have the same core component. i mean, until just about a year ago, i was only using commands to manage buffers, nothing else, was fine for a while, most of my things never have me working on more than a few files at once, but then i started working on bigger projects and it very quickly became unbearable and … yea, switched to nnn, and now i got used to it

going back to your plugin though, it kind of throws me off that you have a tree like structure being shown, yet only showing directories and files linearly. i guess with just kakoune and shell, doing an actual tree style filetree is quite complicated

---

<div class="post-metadata">

**Author:** ![kmafeni04](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/kmafeni04/32/1627_2.png) [@kmafeni04](https://discuss.kakoune.com/u/kmafeni04)\
**Post date:** [May 5, 2026, 10:39pm UTC](https://discuss.kakoune.com/t/tree-kak/2882/7 "2026-05-05T22:39:07Z")

</div>

> [@srazkvt](#):
>
> going back to your plugin though, it kind of throws me off that you have a tree like structure being shown, yet only showing directories and files linearly. i guess with just kakoune and shell, doing an actual tree style filetree is quite complicated

My original implementation actually had a 2 level deep tree preview but as I developed it further, I just felt I didn’t need it and it took too much space on the screen. Coming from lf where I only had one pane available due to the size constraint, I only ever saw the current directory and was fine with that.

The tree style now is more of an aesthetic thing and I could replace the implementation with ls and it would all work exactly the same.

It is still very possible to have the tree structure but doesn’t seem all that necessary. If people want that as the default behaviour then I’ll reimplement it

 ![image](https://discuss.kakoune.com/uploads/default/original/2X/2/29ba7fcbd5468ae807bc5108cb759a7c5d9bb441.png)

---

<div class="post-metadata">

**Author:** ![kmafeni04](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/kmafeni04/32/1627_2.png) [@kmafeni04](https://discuss.kakoune.com/u/kmafeni04)\
**Post date:** [May 5, 2026, 10:46pm UTC](https://discuss.kakoune.com/t/tree-kak/2882/8 "2026-05-05T22:46:55Z")

</div>

The major reason why I didn’t keep this as an option is that I could not come up with a good way to fold individual directories and didn’t spend a long enough time to figure it out.

After speculating on the problem, I came up with those other reasons.

The plugin was mostly conceived in a couple hours so I didn’t spend too much time on solving “unnecessary” problems

---

<div class="post-metadata">

**Author:** ![srazkvt](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/srazkvt/32/1548_2.png) [@srazkvt](https://discuss.kakoune.com/u/srazkvt)\
**Post date:** [May 7, 2026, 9:21am UTC](https://discuss.kakoune.com/t/tree-kak/2882/9 "2026-05-07T09:21:45Z")

</div>

well a full tree view is nice, but it’s not very useful if it shows absolutely everything, and that’s why i consider a tree view to be complicated, if i am ever to do one, it’d be a standalone tool on the side

also i’m not particularly interested in using your plugin, nnn works already for me, i just think it’s cool

---

<div class="post-metadata">

**Author:** ![kmafeni04](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/kmafeni04/32/1627_2.png) [@kmafeni04](https://discuss.kakoune.com/u/kmafeni04)\
**Post date:** [May 8, 2026, 4:25pm UTC](https://discuss.kakoune.com/t/tree-kak/2882/10 "2026-05-08T16:25:36Z")

</div>

> [@srazkvt](#):
>
> also i’m not particularly interested in using your plugin, nnn works already for me, i just think it’s cool

That’s fine, just using the space to speculate features

---

<div class="post-metadata">

**Author:** ![kmafeni04](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/kmafeni04/32/1627_2.png) [@kmafeni04](https://discuss.kakoune.com/u/kmafeni04)\
**Post date:** [May 8, 2026, 4:30pm UTC](https://discuss.kakoune.com/t/tree-kak/2882/11 "2026-05-08T16:30:33Z")

</div>

Since the orginal preview of this, I have added some new things

- Select multiple files to perform actions on
- Copy info like file path, name and directory
- Auto increment files on paste if file already exists
- Indicators for selected or copied files
- Properly showing the name of the folder you are currently in

Some of these need to be polished further but the functionality is at least there

---

<div class="post-metadata">

**Author:** ![kmafeni04](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/kmafeni04/32/1627_2.png) [@kmafeni04](https://discuss.kakoune.com/u/kmafeni04)\
**Post date:** [May 19, 2026, 8:36pm UTC](https://discuss.kakoune.com/t/tree-kak/2882/12 "2026-05-19T20:36:40Z")

</div>

I have decided to rename the plugin and switch it’s implementation `ls`, as I was clearly not using it as a “tree”

[https://github.com/kmafeni04/ls.kak](https://github.com/kmafeni04/ls.kak)
