Mac – Editor for ‘git bash’ on Windows (editor for mingw/msys+mintty)

emacsgitmingwminttynano

I am using 'git bash' for Windows (from 'git for Windows') which in turn consists of mingw+msys and a mintty.

This mingw installation contains a 'vi' editor which works in the mintty. Good.

Question: Are there any other editors available which run in the mintty terminal emulation window?

The problem is that apparently the mintty terminal window is not a real tty but just uses stdin/stdout to communicate with the application (editor).

Nano just says: 'Redirection is not supported.'.
Emacs -nw just says emacs: 'standard input is not a tty'

I would be happy with any basic text editor which has a better user interface than vi.

Best Answer

Picking up on JFM's answer to a the question How to run emacs in CLI mode under mintty in windows?

JFM points out that the native win32 emacs wants to talk to a Windows console window, not to an actual tty (so the error message we see is misleading, the opposite of what it states is the problem!)

The two immediate options I'm thinking about is

  1. Remove the -nw from emacs -nw in my ~/.gitconfig file and just live with the pop-up emacs; or
  2. Swap from Git Bash to the normal windows command line where the emacs -nw setting works fine.

The advantage for me of the first option is that the Git bash terminal is available across Windows and Mac (and Linux). The advantage of the second option for me is that I can use all my Windows command line knowledge.

Related Question