Skip to content

Instantly share code, notes, and snippets.

@tkfm-yamaguchi
Last active February 5, 2019 04:07
Show Gist options
  • Save tkfm-yamaguchi/7f5e45febbabf230d0feb69928c03aff to your computer and use it in GitHub Desktop.
Save tkfm-yamaguchi/7f5e45febbabf230d0feb69928c03aff to your computer and use it in GitHub Desktop.
Open dir with vaffle when dir is specified while starting vim
" Open vaffle when the first buffer is a directory
" (the directory name is specified as a argument in terminal)
function! s:open_dir_with_vaffle()
let l:bufName = bufname('%')
if (isdirectory(l:bufName))
execute "Vaffle " . l:bufName
endif
endfunction
autocmd MyVimrc VimEnter * call s:open_dir_with_vaffle()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment