yegappan / mru

Most Recently Used (MRU) Vim Plugin
Other
259 stars 48 forks source link

Replace vim splash screen with MRU #31

Open byron-hawkins opened 5 years ago

byron-hawkins commented 5 years ago

Feature suggestion: here is a way to show the MRU window on vim startup when no file was specified on the command line:

fun! Start()                                                                                               

    " don't show MRU if the command line indicated a file to open                                          
    if argc() || line2byte('$') != -1 || v:progname !~? '^[-gmnq]\=vim\=x\=\%[\.exe]$' || &insertmode      
        return                                                                                             
    endif                                                                                                  

    " no file was specified, so show MRU instead of the useless vim splash screen                          
    MRU                                                                                                    

endfun                                                                                                     

augroup splash                                                                                             
    autocmd!                                                                                               
    autocmd VimEnter * call Start()                                                                        
augroup end 
brennen commented 4 years ago

You might want to have a look at vim-startify, which integrates MRU if present.

byron-hawkins commented 4 years ago

The way that I suggested is working fine, thanks. I don't need anything better or different.