forked from denisidoro/navi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b99c86
commit cf090d5
Showing
2 changed files
with
13 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
function navi_key_bindings | ||
function navi-widget -d "Show cheat sheet" | ||
set -q FZF_TMUX_HEIGHT; or set FZF_TMUX_HEIGHT 40% | ||
begin | ||
set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT $FZF_DEFAULT_OPTS --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS +m" | ||
stty sane | ||
env NAVI_USE_FZF_ALL_INPUTS=true navi --print query (commandline) | perl -pe 'chomp if eof' | read -lz result | ||
and commandline -- $result | ||
end | ||
commandline -f repaint | ||
function navi-widget -d "Show cheat sheets" | ||
begin | ||
stty sane | ||
env NAVI_USE_FZF_ALL_INPUTS=true navi --print query (commandline) | perl -pe 'chomp if eof' | read -lz result | ||
and commandline -- $result | ||
end | ||
commandline -f repaint | ||
end | ||
|
||
bind \cg navi-widget | ||
if bind -M insert > /dev/null 2>&1 | ||
bind -M insert \cg navi-widget | ||
end | ||
bind \cg navi-widget | ||
if bind -M insert > /dev/null 2>&1 | ||
bind -M insert \cg navi-widget | ||
end |