mhinz / vim-startify

:link: The fancy start screen for Vim.
MIT License
5.31k stars 186 forks source link

Pr request #489

Closed lesar closed 2 years ago

lesar commented 3 years ago

Please consider to integrate this code on this line:

      " the comment line below is the line to change
      " execute a:entry.cmd a:entry.path
      " begin my change leonardo
      if isdirectory(a:entry.path)
        :enew
        let l:cmd = empty(g:startify_open_folder_cmd) ? 'edit' :  g:startify_open_folder_cmd
        execute l:cmd a:entry.path
      else
        execute a:entry.cmd a:entry.path
      endif
      " end my change leonardo

I use in my vim.rc this configuration:

" ...
let g:startify_session_autoload = 1
let g:startify_session_delete_buffers = 1
let g:startify_change_to_dir = 1
let g:startify_session_persistence = 1
" ... vvvvv
let g:startify_session_before_save = [
            \ 'silent! NERDTreeClose'
            \ ]
let g:startify_open_folder_cmd = 'NERDTree'
" ... ^^^^^^

It make startify work better together NERDTree
but not make startify bind to NERDTree
and if someone not configure g:startify_open_folder_cmd, startify will work like before this change

best regards, leonardo

lesar commented 2 years ago

Find better solution. this is no more necessary.
I integrate the solution on this question best regards, Leonardo