Last active
February 5, 2019 04:07
-
-
Save tkfm-yamaguchi/7f5e45febbabf230d0feb69928c03aff to your computer and use it in GitHub Desktop.
Open dir with vaffle when dir is specified while starting vim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 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