Open Current File's directory in Finder

0 Points

Chris Penner Chris Penner

9 years ago

Use leader-return to open the current file's directory in finder. This only works on OSX of course. Very useful for quickly getting to a project or rearranging files.

Note: set autochdir Makes vim automatically match its current working directory with the current buffer (if that buffer has a file).

Substitute out the mapping for whatever is convenient for you.

" Change into file when editing
set autochdir

"Open current directory
nnoremap <leader><cr> :silent !open .<cr>