mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-19 09:03:43 -05:00
added ftags with preview since I want to spread the love
18
Examples.md
18
Examples.md
@@ -678,6 +678,24 @@ ftags() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# ftags - search ctags with preview
|
||||||
|
# only works if tags-file was generated with --excmd=number
|
||||||
|
ftags() {
|
||||||
|
local line
|
||||||
|
[ -e tags ] &&
|
||||||
|
line=$(
|
||||||
|
awk 'BEGIN { FS="\t" } !/^!/ {print toupper($4)"\t"$1"\t"$2"\t"$3}' tags |
|
||||||
|
fzf \
|
||||||
|
--nth=1,2 \
|
||||||
|
--with-nth=2 \
|
||||||
|
--preview-window="50%" \
|
||||||
|
--preview="bat {3} --color=always | tail -n +\$(echo {4} | tr -d \";\\\"\")"
|
||||||
|
) && ${EDITOR:-vim} $(cut -f3 <<< "$line") -c "set nocst" \
|
||||||
|
-c "silent tag $(cut -f2 <<< "$line")"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### tmux
|
### tmux
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
|
|||||||
Reference in New Issue
Block a user