# Kaktree - interactive file tree in your Kakoune

**URL:** <https://discuss.kakoune.com/t/kaktree-interactive-file-tree-in-your-kakoune/627>\
**Category:** Plugins\
**Tags:** buffer\
**Created:** [June 17, 2019, 9:05am UTC](https://discuss.kakoune.com/t/kaktree-interactive-file-tree-in-your-kakoune/627 "2019-06-17T09:05:29Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![andreyorst](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/andreyorst/32/29_2.png) [@andreyorst](https://discuss.kakoune.com/u/andreyorst)\
**Post date:** [June 17, 2019, 9:05am UTC](https://discuss.kakoune.com/t/kaktree-interactive-file-tree-in-your-kakoune/627/1 "2019-06-17T09:05:29Z")

</div>

> [@I have been using Emacs at work for whole week](https://discuss.kakoune.com/t/i-have-been-using-emacs-at-work-for-whole-week/614/1):
>
> Well, that’s not really a side panel file explorer, but I mean that nothing prevent us from implementing one.

I just want to present my new plugin: [Kaktree](https://github.com/andreyorst/kaktree)

 ![image](https://discuss.kakoune.com/uploads/default/original/1X/83af2b7242a507f7edd594dbc9d70917d175f4ee.png)

It’s simple filetree that supports folding directories, and can open files, change working root, etc. This isn’t full featured file manager, just a simple tree viewer with some interactive capabilities.

---

<div class="post-metadata">

**Author:** ![andreyorst](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/andreyorst/32/29_2.png) [@andreyorst](https://discuss.kakoune.com/u/andreyorst)\
**Post date:** [June 17, 2019, 6:19pm UTC](https://discuss.kakoune.com/t/kaktree-interactive-file-tree-in-your-kakoune/627/2 "2019-06-17T18:19:28Z")

</div>

🤙 calling @robertmeta

---

<div class="post-metadata">

**Author:** ![robertmeta](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/robertmeta/32/833_2.png) [@robertmeta](https://discuss.kakoune.com/u/robertmeta)\
**Post date:** [June 17, 2019, 7:06pm UTC](https://discuss.kakoune.com/t/kaktree-interactive-file-tree-in-your-kakoune/627/3 "2019-06-17T19:06:20Z")

</div>

Misclick from mobile, meant to be 🤘 hand.

---

<div class="post-metadata">

**Author:** ![TeddyDD](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/teddydd/32/21_2.png) [@TeddyDD](https://discuss.kakoune.com/u/TeddyDD)\
**Post date:** [June 18, 2019, 8:10am UTC](https://discuss.kakoune.com/t/kaktree-interactive-file-tree-in-your-kakoune/627/4 "2019-06-18T08:10:59Z")

</div>

Well done! Could you mention in readme it requires master branch build of Kakoune? Some of us are stuck with six moths old stable version ☹

---

<div class="post-metadata">

**Author:** ![andreyorst](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/andreyorst/32/29_2.png) [@andreyorst](https://discuss.kakoune.com/u/andreyorst)\
**Post date:** [June 18, 2019, 8:14am UTC](https://discuss.kakoune.com/t/kaktree-interactive-file-tree-in-your-kakoune/627/5 "2019-06-18T08:14:00Z")

</div>

oh, totally forgot about it! Sure I’ll add this info.

> [@TeddyDD](#):
>
> Some of us are stuck with six moths old stable version ☹

\*hugs\* I know that feel, I’m using stable Kakoune on mobile, because it can’t build master ☹

---

<div class="post-metadata">

**Author:** ![andreyorst](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/andreyorst/32/29_2.png) [@andreyorst](https://discuss.kakoune.com/u/andreyorst)\
**Post date:** [December 19, 2019, 9:08am UTC](https://discuss.kakoune.com/t/kaktree-interactive-file-tree-in-your-kakoune/627/6 "2019-12-19T09:08:13Z")

</div>

Important update. Now **kaktree** remembers directory states, so refreshing the tree or folding directories now doesn’t loose tree state! More features to come soon.

Huge thanks to @topisani for contributing the solution for a problem I could not solve myself for a long time!

---

<div class="post-metadata">

**Author:** ![duncan](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/duncan/32/95_2.png) [@duncan](https://discuss.kakoune.com/u/duncan)\
**Post date:** [December 23, 2019, 11:24pm UTC](https://discuss.kakoune.com/t/kaktree-interactive-file-tree-in-your-kakoune/627/7 "2019-12-23T23:24:12Z")

</div>

Thanks Andrey, another great plugin.  
A `readlink` work around for those not using the [linux readlink](https://linux.die.net/man/1/readlink) is:  
my $real\_path = `realpath -m – $path`;

> <https://github.com/andreyorst/kaktree/blob/master/perl/kaktree.pl#L33>

  
Cheers guys.

---

<div class="post-metadata">

**Author:** ![1g0rb0hm](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/1g0rb0hm/32/407_2.png) [@1g0rb0hm](https://discuss.kakoune.com/u/1g0rb0hm)\
**Post date:** [January 10, 2020, 10:53pm UTC](https://discuss.kakoune.com/t/kaktree-interactive-file-tree-in-your-kakoune/627/8 "2020-01-10T22:53:13Z")

</div>

Thanks for this @andreyorst! This is the best interactive file exporer plugin I have found for **Kakoune**. For anyone coming from **vim** / **neovim** this is a true alternative to **[NERDtree](https://github.com/preservim/nerdtree)**.

Some very minor modifications were necessary to get it to work on **Darwin** in combination with **[kitty](https://sw.kovidgoyal.net/kitty/)** terminal. Folder icons are from [NerdFont - FiraCode](https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode) (see fork at [https://github.com/1g0rb0hm/kaktree](https://github.com/1g0rb0hm/kaktree)):

![Kaktree](https://discuss.kakoune.com/uploads/default/original/1X/9ea7c2cbed70927e657328b49367634bb29ca906.gif)

---

<div class="post-metadata">

**Author:** ![andreyorst](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/andreyorst/32/29_2.png) [@andreyorst](https://discuss.kakoune.com/u/andreyorst)\
**Post date:** [February 13, 2020, 6:03am UTC](https://discuss.kakoune.com/t/kaktree-interactive-file-tree-in-your-kakoune/627/9 "2020-02-13T06:03:48Z")

</div>

Kaktree now supports both readling -m and realpath -m based on OS type

---

<div class="post-metadata">

**Author:** ![andreyorst](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/andreyorst/32/29_2.png) [@andreyorst](https://discuss.kakoune.com/u/andreyorst)\
**Post date:** [May 6, 2020, 10:45am UTC](https://discuss.kakoune.com/t/kaktree-interactive-file-tree-in-your-kakoune/627/10 "2020-05-06T10:45:49Z")

</div>

It is now possible to select client in which file should be visited:

 ![image](https://discuss.kakoune.com/uploads/default/original/1X/6e5d0e9a679d598bc5affc483c7b6d27384bbd8f.png)

New shortcut was added for this feature: Alt+Ret
