-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Edit multiple files / load multiple files into buffer list for :Git <command>
's
#2352
Comments
The one file limitation is a consequence of this shell script only acting on vim-fugitive/autoload/fugitive.vim Lines 3942 to 3945 in d4877e5
Wrapping a
Not a fan of any interface that would put the files somewhere they aren't readily visible to the user. Would be amenable to splits. |
Thanks for your input. The wrapping with a
This is the proper solution. From the top of your head, what would roughly be
I think I might have not expressed myself clearly. The |
Yes, that seems better than the current behavior of ignoring all but the first file.
Big picture, you could write the full list of filenames to for arg in "$@"; do echo "$arg" >> "$FUGITIVE.edit"; done Then change the code Fugitive side to handle that list. Exact steps there will depend on the interface.
The way it works when it's called from the shell is that Vim is invoked with multiple arguments, which Vim loads into the "argument list". See Adapting this workflow to a long-running Vim instance complicates things. Most notably, we need an alternative to exiting Vim. If the best you can do is "something like |
Git send-email by default uses multi-file edit mode (sendemail.multiEdit) when more than one patch file requires editing an associated email message and/or cover-letters. Multi edit mode spawns one editor instance with multiple files in argument list. This behavior is supported by creating multiple splits for a running vim instance when `:G send-email` is called. When the user sets sendemail.multiEdit to false in the local or global config, if multiple files need editing then they are processed sequentially in a single split at a time. Closes tpope#2352
Assume the command in question is
:Git send-email --annotate HEAD~2
. This will prepare patches for the last two commits pointed to byHEAD
and prepare one email message for each which will be sent to the editor for further editing because of the--annotate
flag. The default for the optionsendemail.multiEdit
istrue
which will start one editor instance with two buffers loaded (one for each email message) when above command is executed from the command line. The user can then jump back and forth between these buffers and further edit the messages. When the editor instance is closedgit
will send the emails. Whensendemail.multiEdit
isfalse
the process is sequential, starting a new editor instance for every file that needs editing.When the above command is executed from within
vim
(withsendemail.multiEdit = true
) only the first file to edit is loaded into the buffer list. When that buffer is removed, the command immediately proceeds to sending the email(s), assuming the remaining email messages do not need editing (these buffers are somehow lost in the process). Whensendemail.multiEdit = false
, the user gets the chance to edit each message but the process is sequential.Is it possible for a
Git <command>
that expects to edit multiple files, to load all these files into the buffer list at once? The command must only proceed when all these buffers are removed using something like:bd /tmp/tmp_folder/*.patch
or some other means.Thanks,
fabs
The text was updated successfully, but these errors were encountered: