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

Enhancement: Add nano as a choice of editor(s) for git-commit because vim increases what we have to tell to beginners #1224

Closed
1 task
tats-u opened this issue Jul 1, 2017 · 9 comments
Milestone

Comments

@tats-u
Copy link

tats-u commented Jul 1, 2017

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.13.1.windows.2
built from commit: a36e14b3aaa0ddb633c40a9c8483e6fe12d99616
sizeof-long: 4
machine: x86_64
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 6.3.9600]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Path Option: Cmd
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: LFOnly
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled

  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

None

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Bash

nano
  • What did you expect to occur after running these commands?

Nano begins running

  • What actually happened instead?
bash: nano: command not found
  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?
    None

You adopts Vim as the default and only text editor in Git for Windows. I think Vim is the best CUI editor as long as you are familiar with how to use it, but it is not easy for beginners to use because commands of it are hidden, and different from other editors that are available in Windows. Therefore, it increases what we have to tell to Windows users who have not used Git and CUI, and who you want to join in projects that adopt Git as the version management system. Basic commands of Nano, unlike those of Vim, are shown in terminal and beginners can edit commit messages of Git without googling or seeing help. To say more specifically, what you have to do to git-commit in Nano are typing git commit, writing commit message, and pressing Ctrl+O, Enter, and Ctrl+X, which are shown in the bottom of the screen. Beginners who have not used Vim must not known it is pressing the key I or Shift-O what they have to do first to git-commit in Vim. Furthermore, Ubuntu adopts Nano, not Vim, as the default editor. I want you to enable who are installing Git in Windows to choose not only Vim but also Nano as the text editor to, for example, git-commit in, for example, the installation wizard for the above reasons.

@dscho
Copy link
Member

dscho commented Jul 3, 2017

This is related to #291. As you can see by the age of that ticket, help is desperately needed.

@TheOneRing
Copy link

Please at least ship nano

@tats-u
Copy link
Author

tats-u commented Jul 7, 2017

Sorry for very late reply, but anyway I'd like you to bundle nano, not only Vim, with Git for Windows. The difference from #291 is that an easier to learn editor than Vim that works on CUI should be also available as editors in Git Bash.

@dscho
Copy link
Member

dscho commented Jul 7, 2017

Please at least ship nano

And NotePad++, of course. And VS Code. And...

@tats-u
Copy link
Author

tats-u commented Jul 8, 2017

Atom should be added as a GUI editor because it is developed by GitHub, but I'm not talking about GUI editors but CUI editors on this issue.

@TheOneRing
Copy link

Please at least ship nano

And NotePad++, of course. And VS Code. And...

Nano is a unix application and usually requires a setup like msys. Which is basically shipped by git.
So shipping nano is totally different to shipping notepad....

@dscho
Copy link
Member

dscho commented Jul 9, 2017

Atom should be added as a GUI editor because it is developed by GitHub

@tats-u and VS Code is a GUI editor that is developed by Microsoft, so that should be included as well?

My comment about NotePad++ was actually intended to show the problem with including even one more editor: there would always be users hating that choice and resenting that their favourite editor was not included.

This is a discussion (or if you want, a flame war) for which I seriously lack the time and motivation.

Please at least ship nano

And NotePad++, of course. And VS Code. And...

Nano is a unix application and usually requires a setup like msys. Which is basically shipped by git.
So shipping nano is totally different to shipping notepad....

@TheOneRing it is really easy to ask an overworked maintainer for new features. It is a bit more involved, and infinitely more rewarding, to add such a feature via a Pull Request.

Assuming that you are not one of those who ask and vanish when being asked back, here are the steps:

  • install Git for Windows' SDK,
  • see whether nano is already an installable package via pacman -Sy nano,
  • if it is not, start working on packaging it,
  • once it is installed, first build a custom installer without nano,
  • then edit /usr/src/build-extra/make-file-list.sh to include the nano package (it should be pretty obvious where the list of packages is),
  • build another custom installer to verify that:
    • it does include nano
    • the size difference to the installer without nano is indeed as negligible as you claim it to be (i.e. provide evidence to back up your hypothesis),
  • then edit /usr/src/build-extra/installer/install.iss following the example of git-for-windows/build-extra@16975a7 to add an (opt-in) option that sets the core.editor config value to nano via git config --system core.editor nano.exe,
  • build another custom installer to verify that the option works,
  • commit the two changes in /usr/src/build-extra/ as separate commits with good commit messages,
  • and finally open a Pull Request at https://github.com/git-for-windows/build-extra.

@tats-u
Copy link
Author

tats-u commented Jul 14, 2017

@dscho I'm sorry. it is not very import who develops editors for this issue. I wanted to say Atom has strong relationship with Git as well as VSCode does. They have the same priority because they are both modern, free, popular, and cross-platform, and deeply concerned with Git. I think that the more editors are supported, the better it is.

Is it correct that how to support for not only beginner-friendly CUI editor(s), which I want to be mostly improved, but also GUI editors are discussed here?

@ostueker
Copy link

ostueker commented Nov 5, 2017

Atom, Notepad++, VSCode already come as Windows-Installers and are easy to install even by beginners. However it is very difficult to install Nano in an existing installation of "Git for Windows" and even more error prone to make it work in "Git Bash". Shipping the msys2 build of nano with the "Git for Windows" is the superior solution, especially as it only needs 2.3 MiB space once installed and the size of the installer is only increased by ~100 KiB.

Please consider my PR git-for-windows/build-extra#161 for inclusion in the next release.

@dscho dscho added this to the v2.15.0(2) milestone Nov 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants