Trying to install Far-manager as an editor for commits in Git:

git config --global core.editor "'C:/Program Files/Far Manager/Far.exe' -e" 

After git commit , an empty line appears, where you can enter text, Enter takes the cursor pointer to a new line, but how to send the printed text as a comment to the commit? Exit from the "empty line" is obtained only by pressing Ctrl + C, after which, of course, the commit is not executed.

I work in git bash in Windows 8 (Git for Windows).

Upd : Checked command launch from cmd.exe:

> "C: / Program Files / Far Manager / Far.exe" -e Readme.txt

Everything works fine: the lights are started in the file editing mode, after pressing F2, the changes are recorded.

Checked the same from git bash:

$ "C: / Program Files / Far Manager / Far.exe" -e Readme.txt

The cursor is lowered by one line, blinking, you can write text, only save changes at least somewhere, only Ctrl + C helps

  • And how does the key react to the 'q' and the 'F1-F12'? - Monk
  • When you click on any alphanumeric character it is written in the console, when you press F1, F2, F3, F4 you write, respectively, P, Q, R, S, by pressing F5-F12 nothing happens at all. - Miron
  • Ctrl + d is unlikely, of course, - 0andriy

3 answers 3

The answer found in the office. Git for Windows repositories: github.com/git-for-windows/git / .... Far Manager does not start in the mintty terminal that is used in git bash. Tips on how to integrate Far-Manager and Git for Windows are in the link above, I decided not to bother, but use the built-in Windows Notepad.exe :)

Since Git for Windows 2.5.3+:

 $ git config --global core.editor notepad $ git config --global format.commitMessageColumns 72 

    Purely as an assumption (I did not use it myself) ... There is a version of Midnight Commander for Windows . If the mcedit editor is running in a separate program in this build, I think you can try running it, and maybe even succeed.

    Add: For the sake of interest, checked, the editor starts up normally, like this: mc -e файл

      Create a bat file ed.bat , in which to register:

       "C:/Program Files/Far Manager/Far.exe" -e %1 

      and then

       git config --global core.editor "path to file/ed.bat"