Skip to content

Commit

Permalink
add nicer navigation keys
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed Jan 16, 2020
1 parent dd9fd31 commit 139bc73
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions dotfiles/kakoune.nix
Expand Up @@ -7,6 +7,8 @@ let
lib = nixpkgs.lib;
};

similar-sort = pkgs.callPackage ../pkgs/similar-sort { };

# plugins
pluginSources = lib.filterAttrs
(_: source: lib.attrByPath [ "kakoune" ] "" source == "plugin") sources;
Expand Down Expand Up @@ -142,6 +144,18 @@ in {
effect =
": connect-terminal sh -c %{ ranger --choosefile=/tmp/magic-file-selector $(dirname $1); if test -f /tmp/magic-file-selector; then edit $(cat /tmp/magic-file-selector); rm /tmp/magic-file-selector; fi } -- %val{bufname}<ret>";
}
{
mode = "normal";
key = "<minus>";
effect =
": connect-terminal sh -c %{ edit $(git ls-files --others --cached --exclude-standard | ${similar-sort}/bin/similar-sort $1 | fzf --tiebreak index) } -- %val{bufname}<ret>";
}
{
mode = "normal";
key = "<a-minus>";
effect =
": connect-terminal sh -c %{ buffer $(buffer | ${similar-sort}/bin/similar-sort $1 | fzf --tiebreak=index) } -- %val{bufname}<ret>";
}

# vertical selection
{
Expand Down

0 comments on commit 139bc73

Please sign in to comment.