-
Notifications
You must be signed in to change notification settings - Fork 614
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
Feature request: separate editor for git actions (blocking) vs files (non-blocking editor) #889
Comments
@avivey how have you setup tig to open files at line in N++? The command line parameter differ in VIM and N++. |
@yegorich I disabled |
@avivey thanks. |
Bumping this as I come across the same requirement. Right now, I have a blocking vim editor for git, as it has to be blocking. Then when I want to talk to git ("which part of this big file was modified recently?"), I get to this part answer using tig, then I memorize the file and line number, and then I navigate to it using nvim-qt. I wish I could skip the memorize+navigate step, for example binding "e" to a non-blocking nvim-qt, and leave the other git operations (git commit for example) to a blocking simple vim. EDIT: I will try to bind non blocking edit to tig, and realize my git operations outside of tig using the terminal to see how it feels. |
Adding a TIG_EDITOR variable wouldn't be complicated. I almost forgot about it but I made an attempt when the issue was created. Try koutcher@127cbf7. |
|
@koutcher: Ok, thinking about it some more, it makes sense: When invoking git actions, tig doesn't control the editor - git does, so it would ignore Neat. |
I would love to try koutcher’s patch, but I don’t know how to build for win32. I have tried to install gnu32 make + deps and gnu32 automake, add the bin directories to the path,
Ok, the deps are not shipped with gnu32. after installing https://sourceforge.net/projects/gnuwin32/files/make/3.81/make-3.81-dep.zip/download?use_mirror=kumisystems&download= , I get the following errors
|
Automake doesn't really support windows. Can you use WSL? choco install cygwin
choco install--source=cygwin git gcc-core make automake pkg-config libiconv-devel libncurses-devel
$Env:PKG_CONFIG_PATH = "C:\tools\cygwin\lib\pkgconfig"
$Env:PATH = "C:\tools\cygwin\bin;" + $Env:PATH
git -c core.autocrlf=false -c core.eol=lf clone https://github.com/jonas/tig
cd tig
make configure
sh configure
make |
Thanks @krobelus ! Have compiled with Cygwin, added the Cygwin bin to my path, and it just works great ! Thanks ! |
@MartyLake How did you set up your TIG_EDITOR? |
@blayz3r I have it setup like this in my
when I hit |
@MartyLake Thanks that works great!! |
(This might be a little niche...)
It might make sense to allow different EDITOR selection for "edit file" action then for "edit commit message" action.
My reasoning here is that "edit commit" (and probably all of git actions that require editor) is a blocking action - git waits for the editing to complete before continuing. "Edit a file", OTOH, might be a long operation - open the file in my IDE in a separate window, and continue whatever it was I was doing in tig in this terminal - like maybe open a couple more files from the same diff.
(In my case, I use Notepad++ for "long edits" and Nano for "short" ones, because it's hard to setup N++ to "blocking" mode).
The text was updated successfully, but these errors were encountered: