Home  >  Q&A  >  body text

vimrc - How does gvim automatically run a command in command mode at startup?

I want GVIM to automatically run the :MRU command when it starts (this command turns on the MRU plug-in). But when writing vimrc directly, an error occurs

What should I do?

phpcn_u1582phpcn_u15822712 days ago639

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-05-16 16:36:33

    :help GUIEnter

                                *GUIEnter*
    GUIEnter            After starting the GUI successfully, and after
                    opening the window.  It is triggered before
                    VimEnter when using gvim.  Can be used to
                    position the window from a .gvimrc file: >
        :autocmd GUIEnter * winpos 100 50

    You should write like this: autocmd! GUIEnter * :MRU

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-16 16:36:33

    Add colon

    :MRU

    reply
    0
  • Cancelreply