m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-20 09:33:42 -05:00

Updated examples (markdown)

Thomas Frössman
2014-07-10 17:52:18 -07:00
parent b6120e5ded
commit b580d142f4

@@ -139,6 +139,22 @@ fs() {
}
```
z
-
Integration with [z](https://github.com/rupa/z), like normal z when used with
arguments but displays an fzf prompt when used without.
```sh
z() {
if [[ -z "$*" ]]; then
cd "$(_z -l 2>&1 | sed -n 's/^[ 0-9.,]*//p' | fzf)"
else
local reporoot="$(command git rev-parse --show-toplevel 2> /dev/null)"
_z $reporoot "$@"
fi
}
```
Vim scripts
===========
@@ -159,7 +175,7 @@ command! -nargs=1 AgFZF call fzf#run({
function! AgHandler(l)
let keys = split(a:l,':')
execute 'tabe +' . keys[-2] . ' ' . escape(keys[-1], ' ')
endfunction
endfunction
function! Arghandler(l)
return "ag -i " . a:l . " | sed 's@\\(.[^:]*\\):\\(.[^:]*\\):\\(.*\\)@\\3:\\2:\\1@' "