search actual buffer contents, not file contents
This commit is contained in:
parent
f59c1c98b7
commit
de6af42b6e
1 changed files with 6 additions and 1 deletions
|
@ -176,8 +176,13 @@ define-command -hidden fzf-buffer-search %{
|
||||||
title="fzf buffer search"
|
title="fzf buffer search"
|
||||||
message="Search buffer with fzf, and jump to result location"
|
message="Search buffer with fzf, and jump to result location"
|
||||||
echo "info -title '$title' '$message'"
|
echo "info -title '$title' '$message'"
|
||||||
|
current_line=$kak_cursor_line
|
||||||
|
tmp=$(mktemp $(eval echo ${TMPDIR:-/tmp}/kak-curr-buff.XXXXXX))
|
||||||
|
echo "execute-keys %{%<a-|>cat<space>><space>$tmp<ret>}"
|
||||||
|
# echo "execute-keys %{$current_line g}"
|
||||||
|
echo "fzf \"execute-keys \$1 gx\" \"(nl -b a -n ln $tmp\" \"--reverse | cut -f 1)\""
|
||||||
|
rm -rf $tmp
|
||||||
}
|
}
|
||||||
fzf "execute-keys $1 gx" "(nl -b a -n ln '%val{buffile}'" "--reverse | cut -f 1)"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{
|
define-command -hidden fzf -params 2..3 %{ evaluate-commands %sh{
|
||||||
|
|
Loading…
Reference in a new issue