vi Editor on Cygwin

I installed Cygwin today and my vi editor was not working i.e. on while using vi command, I was getting "command not found" error.
I realized that many have faced this problem and the previous threads on this have been closed without complete answers.
I tried something and it worked. Wanted to share with anyone who has faced this problem.

If you have already installed Cygwin using the setup.exe, it means you have forgotten to include the vi package.
Before installing the same again, ensure that all instances of Cygwin are closed. This will avoid the reboot after installing a new package. Once all Cygwin windows are closed, Click on the setup.exe again and this time when asked to select a package, make sure that you select vim package listed under the "Editor" category.
Once done, you are ready to use vi. Happy editing!

install vim in cygwin. default install will not include it.