Replies: 3 comments 8 replies
-
The |
Beta Was this translation helpful? Give feedback.
-
here is the recommended way to do this with fzf: junegunn/fzf#1014 (comment) the |
Beta Was this translation helpful? Give feedback.
-
okay, the solution i've settled on is to have a bash script in my path named #!/bin/bash
set -eou pipefail
grep -nEv '^[[:space:]]*$' "$1" \
| fzf \
--tiebreak=begin \
--exact --tabstop=4 \
--height=100% \
--layout=reverse \
--no-hscroll \
--color=hl:-1,hl+:-1 \
--preview-window=wrap \
--delimiter=':' \
--with-nth=2.. \
| sed 's/:.*$//' \
| xargs -o -I {} vim +{} "$1" and then set in [tools]
editor = 'vf' |
Beta Was this translation helpful? Give feedback.
-
Verify
Share your idea or feature request
it would be awesome to jump to the line number of where text was found
for example,
zk edit -i
, search for a string, press enter, vim opens at that line.vim itself supports a
+<lnum>
eg.+23
to jump to line 23.one way to support this generically would be to have var expansion
{{line-number}}
then we could use this in the
editor
fieldeditor = "vim +{{line-number}}"
Beta Was this translation helpful? Give feedback.
All reactions