≡ Menu

How To Install and Configure Vi / Vim Editor on Windows OS

Question: On UNIX / Linux platform, I’ve used Vi or Vim editors and I’m very comfortable with it. I would like to use Vim editor on Windows OS also. How do I install and configure Vim editor for Windows platform ( Windows XP, Vista or Windows 7 )?

Answer: Follow the steps mentioned below to install and configure the gVim editor on Windows platform.

1. Download Vim for Windows

Go to Vim Download page and click on “PC: MS-DOS and MS-Windows”. Click on the ‘gvim72.exe, which is a Self-installing executable.

(or) Download gvim72.exe directly.

2. Install gVim

After downloading click on gVim72.exe, which will install gVim on your Windows as shown below.

gVim for Windows - Setup Confirmation

Fig: Vim Installation Confirmation

Vim editor for Windows 7 - Accept License Agreement

Fig: Vim 7.2 License Agreement

Vim for Windows XP - Select Installation Options

Fig: Vim Installation Option. (Make sure to select “Full” from the drop-down list)

Vim for Windows Vista - Installation Location Selection

Fig: gVim Installation location ( directory should end with vim )

Vi for Windows - Installation complete

Fig: gVim Installation Progress and Completion

3. Configure gVim

  • On UNIX platform Vim configuration file is called .vimrc
  • On Windows platform the vim configuration file is called _vimrc
  • _vimrc file is located under $HOME/_vimrc. For example: C:\Documents and Settings\ramesh\_vimrc
  • Please note there is a _ (underscore) before vimrc on Windows platform
Add your comment

If you enjoyed this article, you might also like..

  1. 50 Linux Sysadmin Tutorials
  2. 50 Most Frequently Used Linux Commands (With Examples)
  3. Top 25 Best Linux Performance Monitoring and Debugging Tools
  4. Mommy, I found it! – 15 Practical Linux Find Command Examples
  5. Linux 101 Hacks 2nd Edition eBook Linux 101 Hacks Book

Bash 101 Hacks Book Sed and Awk 101 Hacks Book Nagios Core 3 Book Vim 101 Hacks Book

Comments on this entry are closed.

  • Andreas January 22, 2010, 7:04 am

    After this you have to change the settings in “mswin.vim” to use commands you learned to use in your unix-box:
    ” CTRL-V and SHIFT-Insert are Paste
    ” (my change) map “+gP
    map “+gP

    ” (my change) cmap +
    cmap +

    ” Use CTRL-Q to do what CTRL-V used to do
    ” (my change) noremap

    regards from austria

  • Andreas January 22, 2010, 8:36 am

    sorry the < > went away so here a new try:

    ” CTRL-V and SHIFT-Insert are Paste
    ” SHIFT-Insert might be a good idea,
    ” but we need CTRL-V for “visual block” so:
    ” (my change as comment) map <C-V> “+gP
    map <S-Insert> “+gP

    ” (my change) cmap <C-V> <C-R>+
    cmap <S-Insert> <C-R>+

    ” Use CTRL-Q to do what CTRL-V used to do
    ” not needed for unix-like users so:
    ” (my change) noremap <C-Q> <C-V>

  • vaibhav mahimkar April 14, 2010, 1:49 pm

    vim download page seems to have broken links. Found portable gvim from softpedia

    http://www.softpedia.com/progDownload/Windows-Portable-Applications-GVim-Portable-Download-50508.html

    -Vaibhav

  • je June 17, 2011, 4:57 am

    yep, download link won’t load. go to http://ftp.vim.org/vim/ instead and select OS folders. you can download the installer directly inside each of the folder 🙂

  • V October 18, 2011, 12:17 am

    Thanks vaibhav for softpedia links

  • Shual April 9, 2012, 7:38 am

    Thanks for providing the download link. Installed and works pretty well on my windows box.

  • sambhu dahal August 19, 2012, 9:22 pm

    sir,
    I have downloaded cygwin on windows but when i am going to open files using vim command i find this error ” -bash: vim: command not found” what shoud i do to fix this error

  • Tatiana February 8, 2013, 4:02 pm

    Actually there is no _vimrc by default in your Windows home directory. You need to create it.

    There is actually a _vimrc in the C:\Program Files\Vim directory, but it is awkward editing that one becuase of all the weird Windows permissions issues. It is more convenient to have it in your home directory. And then you can customize it for multiple users, if you have them.

  • Anadhi kaul August 8, 2013, 10:03 am

    thankz fo dz info….ai waz really in need of dis.

  • su123 August 18, 2013, 2:07 pm

    i hav installed vim.But when i m trying to use it,it only creates some error sounds,i was not able to edit anything.The _vmrc file is also present,could u plz help me?
    thanks

  • sonia December 16, 2013, 7:03 am

    Same problem as su123.
    Any answer?
    pl help

  • Amr Nady April 19, 2015, 4:00 pm

    How I can use vim with the nerd tree plugin ?