mhinz / vim-startify

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

Feature request: Add new type 'vcs' for g:startify_lists #548

Open karamellpelle opened 1 year ago

karamellpelle commented 1 year ago

I have let g:startify_change_to_vcs_root = 1 and thought I could list all recent files from that VCS project like so:

let g:startify_lists = [
      \ { 'type': 'dir',       'header': ['   Recent files in project '. fnamemodify(getcwd(), ':t')] },
      \ ]

But getcwd() is not _vcsroot but the current directory (suppose I am in a subfolder of the project).

Suggestion add an additional type 'vcs' (instead of 'dir' here) that lists recent files from the latest edited VCS project.

Konfekt commented 5 months ago

Does this setting work for you? If found Fugitive's

        autocmd BufRead,BufNewFile *
                    \ if !empty(FugitiveGitDir()) |
                    \   Glcd |
                    \ endif

more reliable and was about to open an issue.