0

Recently I downloaded the cygwin file setup-x86_64.exe and run it, and I selected all the vim packages and install them as well. Now i'm trying to edit the vimrc file to install some Plugins, but when i type :e $MYVIMRC in vim, vim just opens a new file named $MYVIMRC.

Questions are:

  1. where and how do i find and edit my vimrc to edit it and install the plugins I want?
  2. Do i need to make a new .vimrc?

Acording to: Install Vim in Cygwin Cygwin does not have a .vimrc file.

notes:

  1. I use a Windows 10 Machine, 64bit operating systems, x64-based processor.
  2. I intend to program in Python3 and what to use vim as my text editor.
2

First, you have to locate your home folder. For example open vim and enter the command :

:!echo $HOME

Then, you just have to put your .vimrc file in the right location which is $HOME/.vimrc.

  • 1
    The ! is not necessary, since Vim has an internal :echo command and $HOME is an environmental variable that is visible within Vim. – Heptite Sep 8 '17 at 16:49
1

The :edit (:e) command does not expand environmental variables. Try this:

:exe "e " . $MYVIMRC

Make sure you include the space after the e before the ".

But the easiest way to do it is just use the ~ expansion that does work with :e:

:e ~/.vimrc

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.