From d5a9b6c7491a44e627c3922ddbc38b84c4fb6bad Mon Sep 17 00:00:00 2001 From: skanehira Date: Sat, 9 Nov 2019 18:09:17 +0900 Subject: [PATCH] add keybinding 'f' to search nodes --- README.md | 2 +- gui/navi.go | 2 +- gui/tree.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f398bde..de0b6a9 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ $ tson -url http://gorilla/likes/json | e | edit json with $EDITOR | | q | quit tson | | Enter | edit node | -| / | search nodes | +| / or f | search nodes | | ? | show helps | | space | expand/collaspe children nodes | | ctrl-j | move to next parent node | diff --git a/gui/navi.go b/gui/navi.go index d790025..6dbe098 100644 --- a/gui/navi.go +++ b/gui/navi.go @@ -41,7 +41,7 @@ var ( editNodes = fmt.Sprintf(RedColor, "e", " edit json with $EDITOR") quitTson = fmt.Sprintf(RedColor, "q", " quit tson") editNodeValue = fmt.Sprintf(RedColor, "Enter", "edit current node") - searchNodes = fmt.Sprintf(RedColor, "/", " search nodes") + searchNodes = fmt.Sprintf(RedColor, "/ or f", " search nodes") toggleExpandNodes = fmt.Sprintf(RedColor, "space", " expand/collaspe nodes") moveNextParentNode = fmt.Sprintf(RedColor, "ctrl-j", "move to next parent node") movePreParentNode = fmt.Sprintf(RedColor, "ctrl-k", "move to previous parent node") diff --git a/gui/tree.go b/gui/tree.go index cf1fc42..2d66e9f 100644 --- a/gui/tree.go +++ b/gui/tree.go @@ -147,7 +147,7 @@ func (t *Tree) SetKeybindings(g *Gui) { g.LoadJSON() case 's': g.SaveJSON() - case '/': + case '/', 'f': g.Search() case 'a': g.AddNode()