mru icon indicating copy to clipboard operation
mru copied to clipboard

Replace vim splash screen with MRU

Open byron-hawkins opened this issue 5 years ago • 2 comments

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 

byron-hawkins avatar Sep 17 '19 08:09 byron-hawkins

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

brennen avatar May 27 '20 06:05 brennen

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

byron-hawkins avatar May 27 '20 08:05 byron-hawkins