Code Monkey home page Code Monkey logo

kakoune-lf's Introduction

Kakoune lf

Deprecated

Use kaktree


kakoune-lf is plugin for Kakoune text editor. It integrates lf file manager as sidebar file browser.

screenshot

Installation

You have to have lf executable in PATH.

Dependencies

Only last stable versions of Kakoune and lf are supported

  • lf file manager

Installation

  1. Install Kakoune plugin. Any of the following methods will do
  • use plug.kak plugin manager
  • load lf.kak from your kakrc: source path/to/lf.kak
  • put lf.kak in your autoloads directory ~/.config/kak/autoload/

Usage

Kakoune commands

  • Open/close lf with :lf command.

  • :lf-follow opens directory containing current buffer (or Kakoune's CWD if buffer is not existing file) in runing lf instance

  • :lf-sync-cwd opens Kakoune CWD in runing lf instance

lf keys

  • up / down j k
  • parent directory h
  • open file under cursor (and selected files if any) in Kakoune l
  • select file space
  • unselect all files u
  • enter command :
  • quit q

See lf documentation for more.

lf commands

  • :lf-sync-cwd change Kakoune's CWD to currently open directory

Kakoune options

  • lf_terminal_cmd name of Kakoune command that will spawn terminal/tmux window with lf. It must expose $kak_session and $kak_client environmental variables. By default it uses terminal (build-in) command. See lf-spawn-new form rc/lf.kak for reference.
  • lf_follow option to enable/disable changing lf path on Kakoune buffer change.
  • lf_openables list of regexes that has to match mimetype of file opened from lf. This prevents opening binary files by accident.

TODO

Check out GH project

Changelog

  • 0.1 2018-09-07:
    • initial release
    • Kakoune v2018.09.04
  • 0.2 2019-02-02:
    • Kakoune v2019.01.20
    • lf r9
    • CHANGE update README to new format
    • CHANGE lf works as a toggle
    • CHANGE reduce amount of configuration that has to be pasted in lfrc (breaking requires manual update of lfrc)
    • CHANGE to new repository layout (breaking update path in kakrc)
    • ADD lf_terminal_cmd option for custom spawn command
  • 0.3 2019-02-07:
    • CHANGE add hooks to lf group
    • ADD editorconfig
    • CHANGE format files in repo with editorconfig
    • ADD opening multiple files at once
    • FIX open paths with spaces
  • 0.9 2019-02-12:
    • lf r10
    • CHANGE move all configuration to Kakoune (breaking requires manual update of lfrc). You can use this plugin without modyfing lfrc
    • CHANGE remove hatch_terminal dependency, use built-in terminal command by default
    • ADD display number of opened files in lf status line
    • ADD :lf-follow command and lf_follow option that look for current opened buffer in lf
    • ADD mimetype check to avoid opening binary files
    • ADD command for synchronizing CWD (lf-cwd-sync)

kakoune-lf's People

Contributors

emmchriss avatar teddydd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

falbru

kakoune-lf's Issues

Make the GlobalSetOption hook part of a group

This isn't strictly needed, but I had a very hard time getting it to work with both tmux, and x11 terminal.
hatch-terminal is only supposed to expose the KAK_CLIENT, and KAK_SESSION variables, the other ones in lowercase are just a side-effect of the terminal being directly spawned from the kak process, inheriting its environment.
On the tmux side, this is different, as spawning a pane is done through the tmux command, which communicates with the server through a pipe, and drops its environment.
The KAK_(CLIENT|SESSION) variables however are deliberately made part of the hatched pane's environment, so they're available.
Switching the configuration is mostly possible, but the hook has to be removed, so that it can be redefined with the uppercase variants, but that is not possible without giving it a group.

TL;DR: Please add the hook to some group

Edit: Also it'd nice to change the way lf is configured when the connection is made

Newline in lf-spawn-new is messing up the spawn

Pretty self-descriptive;
The command should be on one line, because, the terminal command starts the user configured default shell, which, among others can be fish, which doesn't follow the POSIX protocol, and thus fails to interpret the escaped newline.
Just so you know, the %{ ... } is basically just a form of string in kakoune, and doesn't escape anything (except for }, when { is not found somewhere earlier)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.