lazygit: lazygit can not works with editor
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Switch to
Commitspanel - <kbd>R</kbd> to reword commit using editor
+ git rebase --interactive --autostash [hash]
hint: Waiting for your editor to close the file... 2019/09/29 22:34:25 chdir /path/to/.git/rebase-merge/git-rebase-todo: not a directory
error: There was a problem with the editor '/usr/bin/lazygit'.
Press enter to return to lazygit
- I have tried both
git config --global core.editor $(which vim)andgit config --global core.editor $(which nano), neither of them works.
- Switch to
Commitspanel - <kbd>f</kbd> to fixup the commit. <kbd>Enter</kbd> to confirm.
┌─Error───────────────────────────────────────────────────────────────────────────────────┐
│2019/09/29 22:38:49 chdir /path/to/.git/rebase-merge/git-rebase-todo: not a directory │
│error: There was a problem with the editor '/usr/bin/lazygit'. │
└─────────────────────────────────────────────────────────────────────────────────────────┘
- I have tried both
git config --global core.editor $(which vim)andgit config --global core.editor $(which nano), neither of them works.
Expected behavior A clear and concise description of what you expected to happen.
I use nano as default editor for git. lazygit used to works well with nano.
Desktop (please complete the following information):
- OS: Debian 10 WSL1 on Windows 10
- Lazygit Version: latest daily build from Ubuntu PPA
$ lazygit -v
commit=95ae806, build date=2019-09-25, build source=debian, version=, os=linux, arch=amd64
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (9 by maintainers)
Commits related to this issue
- Merge pull request #516 from glvr182/hotfix/path-not-positional #514 Fix positional flag issue — committed to jesseduffield/lazygit by dawidd6 7 years ago
Please try setting
EDITORenvironment variable and then runlazygit.Like:
EDITOR=vim lazygit.https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#configuring-file-editing
Impossible to have a different editor than vim I tried setting it up with both EDITOR env var or core.editor git config.
I tried with code, codei, zed editors, nothing works.
Any idea how I can debug that?
lazygit should fallback to
EDITORifgit.editoris not setIdentified possible bug:
Seems to have side effects