~parasrah/filelist.kak

Kakoune plugin to work with list of files
rc: update filelist-add command to support multiple arguments
breaking-cleanups: address <space> <,> swap
switch to kakoune `breaking-cleanups` branch

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~parasrah/filelist.kak
read/write
git@git.sr.ht:~parasrah/filelist.kak

You can also use your local clone with git send-email.

#filelist.kak

This plugin adds the following features to kakoune:

  1. a filelist buffer containing a list of files, enabling navigation to them
  2. the ability to write comments in filelist buffer by prepending line with #
  3. a filelist-set command to populate the filelist buffer using the find command
  4. a filelist-next and filelist-previous command to jump forward/backward through the filelist
  5. a filelist-execute-keys command to execute a set of keys on each buffer

#Configuration

  • filelist_cmd: option used to control command used for filelist-set
    • example: fd -t file -- ''%%s'' ''%s''
    • %s is placeholder for directory (first argument to filelist-set)
    • %%s is placeholder for pattern (second argument to filelist-set)
  • filelist_default_pattern: option used to control default pattern given to filelist-set
    • example: . for use with fd

#Persistence

The command filelist-enable-persistence will cause the file to be saved in the current working directory as a .filelist.kak file. If you only wish to enable it for specific projects, see hestia.kak for a plugin enabling safe per-project configuration.

NOTE: enabling persistence will cause the filelist to open when you open kakoune, which personally I like.

#Known Issues

  • filelist-execute-keys is currently recursive, and with kakoune lacking tail call optimization, will terminate before completing long filelists
  • using the cd command will change the working directory of kakoune, but the filelist will not be updated to reflect this change

#Thanks

This plugin is largely inspired by the grep.kak configuration in the kakoune repo.