andreyorst / kaktree Goto Github PK
View Code? Open in Web Editor NEWFile explorer side panel for Kakoune
License: MIT License
File explorer side panel for Kakoune
License: MIT License
Kaktree doesn't open when using the kitty terminal emulator. From my testing I think the problem might be in kaktree--display, the variable $kak_opt_termcmd is empty, thus not running the shell command on line 192 in rc/kaktree.kak which should create a new buffer called *kaktree* and client.
A new window containing the filetree should open.
The first time :kaktree-toggle is run nothing happens, after the first time the command gives the error:
Error: 1:1: 'kaktree-toggle' 1:2: 'evaluate-commands' 2:28: 'evaluate-commands' no such client 'kaktreeclient'
in the *debug* buffer.
Kakoune version: Kakoune v2020.09.01-339-g7c321e12
OS version: Manjaro Linux 20.2.1 Nibia
`sh` executable version: GNU bash, version 5.1.0(1)-release (x86_64-pc-linux-gnu)
Currently kaktree only imitates the tree, by doing requests to the filesystem only when user expands the directory, and replacing the contents of the buffer with Kakoune. This means that we currently are not able to refresh the whole tree, and if we fold something that has unfolded directories inside it, on unfolding it again those directories will not be unfolded.
This FR proposes to create and maintain real filetree in some kind of variable, and make all requests based on the information of that tree. This way folding and unfolding can still be done by Kakoune replacement commands, but correct trees will be obtained. This will also allow refreshing full tree from top to bottom.
Work on this feature will be going in real-tree branch.
I don't know if it's bugged or if I'm just doing something wrong, but when I open kakoune and run kaktree-enable
, no window appears. The new commands such as kaktree-focus
do show up, but the tree itself is nowhere to be found.
I installed by cloning the repo to ~/.config/kak/autoload
, and haven't made any changes to my kakrc or anything else. I've checked that my ls
supports all the mentioned options, and perl is installed. My kakoune is version v2020.09.01
.
any file or dir with space in the name makes plugin work incorrectly
Hi, first of all, thanks for writting this plugin.
I would like to be able to turn my current buffer into kaktree, right now if I open it with panes that are split horizontally, their width is altered when I toggle kaktree (this is for tmux), so I thought it would be ok for me to turn my current buffer into kaktree and use it that way, which leds me to wonder if one could somehow display a file preview in a wider UI for kaktree, maybe a simple implementation like runing head or ls depending on the type of the entry bound to some free key.
I'm just wondering, but the thing with the width would be a bug right?
thanks again, have a nice day.
Because tree generated by kaktree is built from information provided by ls -1p
it can't distinguish links to files and links to directories, because they use identical symbol @
at the end of the filename.
Parsing ls -lF
output would be better solution, but harder to do and may not be portable?
The function kaktree--refresh is called after moving, creating or deleting a file. Every time kaktree--refresh is called, the cursor goes to the first line. It would be preferable for this cursor to not move in this scenario. (For instance, creating multiple file in a directory)
mkdir a b c d
and open kakounec
on kaktree and create a new file : N
c/test
The cursor should still be on c
The cursor has moved to the first line
Kakoune version: 2021.08.28
OS version: Fedora 34
sh
executable version: fish, version 3.3.1
I usually have at least two files open simultaneously at all times and I haven't found a nice way of opening a file with kaktree in any other kakoune instance than the one that started kaktree.
I am not sure whether should do this already. I at least did not get it to work.
When you change root of the tree by pressing enter, the marked line moves to the top of the buffer, but there is also a white cursor showing the "real" position. Pressing "j" moves the blue marked line and the cursor below the position of the cursor and pressing enter opens the file or folder under the cursor.
Both the cursor and the marked line should be at the same row, avoiding confusion. I would personally prefer if both would be at the top of the buffer.
The "real" position of the cursor is where it was previously.
After I pressed enter
After I pressed "j" once
Kakoune version: Kakoune v2020.09.01-339-g7c321e12
OS version:
DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=20.2.1
DISTRIB_CODENAME=Nibia
DISTRIB_DESCRIPTION="Manjaro Linux"
sh
executable version: GNU bash, version 5.1.0(1)-release (x86_64-pc-linux-gnu)
Running in TMUX
Right now kaktree needs a bunch of non-POSIX ls command line options to work. It would be great to POSIX-fy the ls usage in order to enable the plugin to be used on busybox or BSD systems.
Error message when toggling show_hidden_files with h
or set-option
. It works, but an error message is printed into *debug*
plug "andreyorst/kaktree" config %{
hook global WinSetOption filetype=kaktree %{
remove-highlighter window/number-lines
map window normal l ''
}
kaktree-enable
kaktree-toggle
nop %sh{
tmux select-pane -R
}
set-option global kaktree_show_hidden false
}
No error message should be triggered
In *debug*
buffer:
error running command 'evaluate-commands -client %opt{kaktreeclient} %{ select }
': 1:1: 'evaluate-commands': 1:2: 'select': wrong argument count
My guess is that the variable fed to select
is empty, which gets handled as an absence of argument without proper quoting
Kakoune v2021.11.08
Calculate linux
zsh 5.8 (x86_64-pc-linux-gnu)
It would be nice if there were an option to be able to have the return key simply open a directory tree when the selection is a directory, and open the file when it is a file, similar to how vim's nerdtree plugin works. Changing the root could be bound to a different key in this mode as well.
It would be nice highlight changed, untracked, ignored, and added files with different colors in the tree.
It seems that currently the client on which a file to be opened is shown is static, but I think the more reasonable default behavior would be to show the file on whichever client ran kaktree-toggle
most recently?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.