Installing gVim and Vim on Windows
Updated  2021-December-19

Page contents


2021-September-26  Published this evolving⁠[1] article.



In this article…


Note that this terminology is specific to this article. Normally Vim means any Vim (GUI or TUI).


Research and download

One of the first things I do on a new Windows device is install gVim and Vim. Here’s how I do that.

  1. Visit and see if anything has changed since the last time I visited

  2. Visit and download the newest “Signed 32-bit installer,” for example gvim_8.2.4050_x86_signed.exe. Note that 32-bit gVim is recommended for most users because 64-bit gVim uses “a lot more memory.”⁠[3][4]



This section lists the install options that I prefer but (of course) you can choose the options that you prefer.

  1. Run the newly downloaded installer and…

  1. in the Choose Components window, choose all components:

    • Uninstall Existing Version(s)  (can’t be unchecked)

    • Vim GUI and runtime files  (can’t be unchecked)

    • Vim console program

    • Create .bat files

    • Create icons for Vim

      • On the Desktop

      • In the Start Menu Programs Folder

    • Add Vim Context Menu

    • Create Default Config

    • Create Plugin Directories

      • Private

      • Shared

    • Native Language Support


  1. in the Choose _vimrc settings window, choose:

    • Vim with all enhancements (load vimrc_example.vim) (Default)

    • Remap a few keys

    • Right: popup menu, Left: select mode (Windows)



Launch from desktop shortcuts

  1. Use Win+D to view your Windows desktop and double click each of the following three shortcuts.

    1. gVim 8.2

    2. gVim Easy 8.2

    3. gVim Read only 8.2

To exit eash of these gVims, choose Exit from the File menu.


Launch from File Explorer’s context menu

  1. Use Win+E to launch Windows File Explorer, right click a plain text file, and choose Edit with Vim.⁠[2]



  1. Launch PowerShell and run the following four commands.


Get the paths

  1. gcm gvim or equivalently get-command gvim (this displays the path to the gvim command). On my system, the following is displayed.

    CommandType     Name           Version    Source
    -----------     ----           -------    ------
    Application     gvim.bat    C:\WINDOWS\gvim.bat
  2. gcm vim or equivalently get-command vim (this displays the path to the vim command). On my system, the following is displayed.

    CommandType     Name           Version    Source
    -----------     ----           -------    ------
    Application     vim.bat    C:\WINDOWS\vim.bat


Launch from a command line

  1. gvim (this should launch GUI Vim from a PowerShell command line)

  2. vim (this should launch TUI Vim from a PowerShell command line)



  1. To display information about this instance of [g]Vim, including locations of vimrc files it can use, do the following.

    1. Press the Esc[5] key to make sure you are in command mode.[6]

    2. Type :version, which is a Vim-style colon command.[7] Here is part of what is displayed on my system:

         system vimrc file: "$VIM\vimrc"
           user vimrc file: "$HOME\_vimrc"
       2nd user vimrc file: "$HOME\vimfiles\vimrc"
       3rd user vimrc file: "$VIM\_vimrc"
            user exrc file: "$HOME\_exrc"
        2nd user exrc file: "$VIM\_exrc"
        system gvimrc file: "$VIM\gvimrc"
          user gvimrc file: "$HOME\_gvimrc"
      2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
      3rd user gvimrc file: "$VIM\_gvimrc"
             defaults file: "$VIMRUNTIME\defaults.vim"
          system menu file: "$VIMRUNTIME\menu.vim"


In gVim, another way to display this information is to choose Version from the Help menu.


:echo $MYVIMRC

  1. To display the path to the vimrc that is currently in use, do the following.

    1. Press Esc to be sure you are in command mode.

    2. Type :echo $MYVIMRC. Just after a clean install, here is what is displayed on my system:

      C:\Program Files (x86)\Vim\_vimrc
      this part of the path is $VIM


Note that this _vimrc file…

  • is one of the items listed in the previous section (3rd user vimrc file: "$VIM\_vimrc")

  • and is where the _vimrc settings you chose during installation (in step 3B above) are stored.



How to exit Vim is one of the most frequently asked questions on the internet. Almost all possible ways are discussed in this entertaining and highly-⁠active thread.  


In gVim, another way to exit is to choose Exit from the File menu.



After I’ve installed gVim and Vim on Windows, life is better. 🎉 🙌 🎈 🎆 🍾 🎇 💃


About TUI Vims on Windows

If you have installed a Unix-⁠like system on your Windows device, for example Git Bash or WSL, you probably have another TUI Vim on your device because Unix-⁠like systems often include the vim or vi[8] command.



To view the above Vim references, either run these commands from within Vim or follow the links (each of which go to


See also


1. Many Infinite Ink articles, including this one, are evergreen and regularly updated.
2. The Windows File Explorer pop-up context menu says Edit with Vim, but it actually edits with gVim.
3. This is a quote from
4. For an example of 64-⁠bit gVim being needed, see’s Windows, Vim, and Python: An Unholy Trinity of Pain.
5. On an English US keyboard, pressing Ctrl+[ (Ctrl+left bracket) is equivalent to pressing the Esc key. This is useful if you are using a keyboard that does not have an Esc key or if you prefer to not take your fingers off the “home row” of your keyboard. More about this is at
6. Vim and apps with Vim-style key bindings are modal. Usually you are in either command mode or insert mode. Command mode is also known as “normal mode.”
7. A Vim-style command that starts with a colon (:) is known as a “colon command” or “Ex command.”
8. Nowadays (2022+) vi usually launches vim.

Comments and questions 📝 👍 👎 🤔

Your public comment or question might immediately improve this page or help me to (eventually) improve this page.