Add '--nofork' flag to vim example in Appendix C#1700
Merged
ben merged 1 commit intoprogit:mainfrom Aug 15, 2021
ed-flanagan:appendix-C-add-vim-foreground-flag
Merged
Add '--nofork' flag to vim example in Appendix C#1700ben merged 1 commit intoprogit:mainfrom ed-flanagan:appendix-C-add-vim-foreground-flag
ben merged 1 commit intoprogit:mainfrom
ed-flanagan:appendix-C-add-vim-foreground-flag
Conversation
The -f/--nofork flag is suggested to be used "... when Vim is executed by a program that will wait for the edit session to finish...." However, this flag is used when Vim has the GUI version, effectively no-op'ing when non-GUI Vim. This mirrors the existing "--nofork" flag for the Windows `gvim` example.
Member
|
Nice. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
The
-f/--noforkflag is suggested to be used "... when Vim is executed by aprogram that will wait for the edit session to finish...." However, this flag
is only used when Vim has the GUI version, effectively no-op'ing when non-GUI
Vim. This mirrors the existing "--nofork" flag for the Windows
gvimexample.Context
I didn't see any prior issues/PRs related to this flag for
vim.This flag did fix a co-worker's issue, referenced in this SO question https://stackoverflow.com/questions/22699614/git-commit-messages-lost-by-vi (I've never personally encountered the issue).
As best I can tell, this flag exists regardless if the user's
vimfeatures a GUI. To be honest, I'm not clear if the flag does anything for justvimand only forgvim.Basing on https://github.com/vim/vim/blob/e29a27f6f8eef8f00d3c2d4cd9811d81cf3026b3/src/main.c#L2124-L2129 & https://github.com/vim/vim/blob/e29a27f6f8eef8f00d3c2d4cd9811d81cf3026b3/src/main.c#L2027-L2032 and
vimman pages.I also went with
--noforkover-fsince I felt long flags are easier to discover. Best I can tell they're equivalent, even if the man page doesn't say so.So, it seems safe to add and "follows" man page description. However, I could see it being considered extraneous if it does nothing for
vimspecifically. So figured I'd send up a PR just in case.