Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

Vim Integration

Aurélien Ooms edited this page Nov 17, 2017 · 4 revisions

Put the snippet below into your .vimrc. Then you can use :Z to cd / jump to directories.

" Z - cd to recent / frequent directories
command! -nargs=* Z :call Z(<f-args>)
function! Z(...)
  let cmd = 'fasd -d -e printf'
  for arg in a:000
    let cmd = cmd . ' ' . arg
  endfor
  let path = system(cmd)
  if isdirectory(path)
    echo path
    exec 'cd' fnameescape(path)
  endif
endfunction

What? You want to open files fasd-style in Vim? Try CtrlP, FuzzyFinder, or Command-T.

Clone this wiki locally