Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Nano editor #161

Merged
merged 3 commits into from
Nov 6, 2017
Merged

Add Nano editor #161

merged 3 commits into from
Nov 6, 2017

Conversation

ostueker
Copy link
Contributor

@ostueker ostueker commented Nov 5, 2017

Nano is a lightweight text editor that most novices to the bash command line find easier to use than vim.

This PR adds the msys2 package of nano to the Git-for-Windows installer and adds an option
(opt-in) to the install process to set it as core.editor.

Nano has a small footprint (installed 2.28 MiB [1]) and only few dependencies that are already included in Git for Windows. According to my tests the size of the installer is only increased by ca. 100 KiB.

The PR has been created according to what @dscho has outlined in git-for-windows/git#1224

[1]:

$ pacman -Qi nano
Name            : nano
Version         : 2.8.7-1
Description     : Pico editor clone with enhancements
Architecture    : x86_64
URL             : https://www.nano-editor.org
Licenses        : GPL
Groups          : editors
Provides        : None
Depends On      : file  libintl  ncurses  sh
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 2.28 MiB
Packager        : Alexey Pavlov
Build Date      : Thu, Sep 07, 2017 03:46:48

@dscho
Copy link
Member

dscho commented Nov 6, 2017

@ostueker Excellent, thank you for taking this on!

I'd like to ask for two minor revisions in the commit messages:

  • could you please mention that it adds only ~100kB to the installer?
  • could you also sign off on your patches?

If you're away from your computer, I can also do that for you, if you are okay with that.

There are a few things that need to be done after that (auto-install nano into the SDK, turn the installer option into a wizard page, describe the option, and add vim as the default option), but I'll simply implement them once you indicated your consent to the requested changes.

@dscho
Copy link
Member

dscho commented Nov 6, 2017

I prepared a couple of commits on top of yours, pending your consent to squash them into your commits (the squash! commits would be reword! commits if Git's interactive rebase already supported that in its autosquash feature).

@ostueker What do you think?

@ostueker
Copy link
Contributor Author

ostueker commented Nov 6, 2017

Thanks @dscho, I would have tried to do these myself once I was back at my Windows box at home.

Looks very good to me!

By the way I would not have even known where to start without your excellent step-by-step guide.

Danke!

ostueker and others added 3 commits November 6, 2017 15:11
Nano is a small text editor that is -- for novices of the bash command
line -- easier to use than e.g. vim, as it displays shortcuts for common
tasks (write out, exit).

Adding it to the Git for Windows installer only increases the installer
size by ~100kB, which is acceptable for the benefit.

[jes: auto-install nano as needed when packaging a new installer]

Signed-off-by: Oliver Stueker <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
Add installer option to use nano (instead of vim) as
default editor for git.

This closes git-for-windows/git#1224

Signed-off-by: Oliver Stueker <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
This allows us to

- describe the option better,

- mark it as recommended,

- describe the `vim` option better (including the fact that it is the
  default, and why), and

- provide hyperlinks where users can learn more about `nano` vs `vim`.

It also keeps the door wide open to add additional editor choices, e.g.
when the user has Notepad++ installed; it is likely their editor of
choice and much preferred over vim if it is installed. And we want to
keep this door open, see e.g. https://www.xkcd.com/378/

The way to force GNU nano to be used when running the installer via the
command-line is to use /o:EditorOption=Nano

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho merged commit 2415ef1 into git-for-windows:master Nov 6, 2017
dscho added a commit that referenced this pull request Nov 6, 2017
It is [now possible to configure
`nano`](#161)
as Git's default editor [instead of `vim`](https://www.xkcd.com/378/).

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
Copy link
Member

dscho commented Nov 6, 2017

By the way I would not have even known where to start without your excellent step-by-step guide.

I am glad it helped. Thank you for your contribution!

@ostueker ostueker deleted the nano branch November 6, 2017 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants