31

I have installed Cygwin on my Windows machine and I have also selected some additional packages as part of my installation (like GCC etc). Now I want to add Vim also to my existing Cygwin setup. What is the procedure to add Vim to my existing Cygwin setup? Or is there some separate binary for Vim in Cygwin which I can untar and install? What is the best option in my current scenario?

3 Answers 3

37

You need to run Cygwin's setup.exe again, and select the packages you want. Vim is not included in the default package.

I've blogged about this, with explicit instructions and a picture: Cygwin setup gotchas | Code and comments

After installing Vim you may find that things just don't seem to be what you are used to. That is because Linux systems usually have a default .vimrc file somewhere. It seems that Cygwin does not. In Vim, run :edit $MYVIMRC to see your .vimrc.

You should get a nice .vimrc from somewhere and place it in your home folder for a better experience. Currently I'm using this one.

2
  • 1
    Your blog is about installing vi. I think vi and vim are different
    – Alex
    Mar 12, 2017 at 6:59
  • 2
    @Alex Sure, vim and vi are different, but my blog post is about how to install utilities (whatever they are) in Cygwin. I hope it helps. I wouldn't be surprised if it is totally out of date, I haven't used Windows or Cygwin in five years. Mar 13, 2017 at 0:47
5

Run the Cygwin setup.exe and pick additional packages (search for vim), that executable is used to add packages and update existing ones; you should run it once a month to update to latest packages.

2
gvim -v

runs vim/vi without GUI, just like the vim improved / enhanced

CygWinX vi is vim minimal and it is a very striped out version of vim the work around to have a fully working version of it is installing gvim (the graphical X Window one) via setup (cygwin64 - Installation Folder) and use it in command line with a -v option, that runs it without GUI, you can also make an alias in .bashrc like:

alias vim='gvim -v $1 $2 $3 $4 $5 $6 $7'

and use it as a regular vim.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .