Install nano editor in your cygwin terminal – Windows Operating System


It just happened that I worked a small personal project using windows 7 operating and having issue with cygwin default editor vim, when casting my terminal.

git commit -a

It will open vim editor by default.

I don’t like or use vim.. not today… maybe I will learn someday?.

so I need nano badly in terminal.

by default the vim is what installed in cygwin.

Usually I used nano in my linux environment.

but aside from that I do have window 7 computer and sometimes i do work using that computer, so I used cygwin as my terminal.. but there is NO nano editor installed.

To install nano see below

First is download cygwin setup here: https://cygwin.com/install.html

then open your cmd terminal in your windows OS.

then locate the cygwin setup you just downloaded

in my case:

C:\Users\<username>\Downloads\Programs>setup-x86_64.exe

then run command

C:\Users\<username>\Downloads\Programs>setup-x86_64.exe -q -P wget,tar,qawk,bzip2,subversion,vim, nano

other packages are optional you can exclude those, for me I just need nano

Ok now, wait until it finish downloading.

Once all good.

then lets set nano as default editor in your cygwin terminal

first is you need to open bashrc:

nano ~/.bashrc

Now to change your bash default editor find.

export EDITOR

However, if you can’t find that, just add this to the top.

export EDITOR=nano

# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

save it!.

close cygwin and now your are good to go.

see images below

It’s now default to nano:

Guestbook Created using Symfony 3.4 and AngularJS 1.6.9


I created simple test small project Guestbook using Symfony 3.4 and AngularJS

Its just a simple one but it is a good guide for beginner.

In this simple project covered the following…

Symfony

  • Controllers
  • Models
  • Event Dispatcher
  • Annotations
  • Using Doctrine Dbal
  • And More.

AngularJS

  • Controllers
  • Methods
  • Directives
  • Factory
  • Module Dependency
  • Etc..

 

If you have any question you can drop a comment question below.

Cheers!

You can check it here: http://guestbook.emisyl.com/

For the database see below

CREATE DATABASE symfony_guestbook;

CREATE TABLE `guestbook` (
 `id` int(11) PRIMARY KEY AUTO_INCREMENT,
 `name` varchar(100) DEFAULT NULL,
 `email` varchar(50) DEFAULT NULL,
 `message` text,
 `created` datetime DEFAULT NULL,
 `deleted` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

GitHub: https://github.com/3misyl/symfony3.4-guestbook