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
ftplugin: sh: don't assume MANPAGER makes sense #14679
Conversation
vim/vim@2f25e40b1 (runtime: configure keywordpg for some file types (#5566), 2023-08-23) added a new keywordprg for Shell files (it was renamed from :Help to ShKeywordPrg in vim/vim@2a281ccca (runtime(sh): Update ftplugin (#13213), 2023-10-07)). Something about it craps out for me, though, dumping terminal garbage all over the screen, and I prefer :Man anyway. See also vim/vim#14679
Thanks. Does it make sense to use instead:
|
I doubt it: that would mess with the user's environment for that Vim, right? In other words, there's not a good way to scope that to just this command (without the save/unlet/restore block), right? |
okay, fine then. @dkearns are you fine with it? |
Thank you @benknoble, grepping shows that a similar Ideally, one day one would employ your solution. |
Say you use Vim and set MANPAGER='vim -M +MANPAGER --not-a-term -'; then :{Zs,S}hKeywordPrg (or K) will crap out and spew terminal garbage into less when bash's "help" fails. This was introduced by 2f25e40 (runtime: configure keywordpg for some file types (vim#5566), 2023-08-23) and may be present in other files touched by that commit. Make the "man" invocation sensible by unsetting MANPAGER in the environment. Note that changing MANPAGER for `:terminal` is not needed; Vim within Vim is perfectly fine.
e2e7d93
to
d909ca4
Compare
I've fixed this up to change Zsh, too. It's true that my code for Git config and SSH config is a bit more sophisticated, but it does assume you want to use |
Thanks, I include it |
related: vim/vim#14679 Signed-off-by: Christian Brabandt <[email protected]>
runtime(sh,zsh): clear $MANPAGER in ftplugin before shelling out Say you use Vim and set MANPAGER='vim -M +MANPAGER --not-a-term -'; then :{Zs,S}hKeywordPrg (or K) will crap out and spew terminal garbage into less when bash's "help" fails. This was introduced by 2f25e40b1 (runtime: configure keywordpg for some file types (vim/vim#5566), 2023-08-23) and may be present in other files touched by that commit. Make the "man" invocation sensible by unsetting MANPAGER in the environment. Note that changing MANPAGER for `:terminal` is not needed; Vim within Vim is perfectly fine. closes: vim/vim#14679 vim/vim@8d8cb45 Co-authored-by: D. Ben Knoble <[email protected]>
runtime(sh,zsh): clear $MANPAGER in ftplugin before shelling out Say you use Vim and set MANPAGER='vim -M +MANPAGER --not-a-term -'; then :{Zs,S}hKeywordPrg (or K) will crap out and spew terminal garbage into less when bash's "help" fails. This was introduced by 2f25e40b1 (runtime: configure keywordpg for some file types (vim/vim#5566), 2023-08-23) and may be present in other files touched by that commit. Make the "man" invocation sensible by unsetting MANPAGER in the environment. Note that changing MANPAGER for `:terminal` is not needed; Vim within Vim is perfectly fine. closes: vim/vim#14679 vim/vim@8d8cb45 Co-authored-by: D. Ben Knoble <[email protected]>
Say you use Vim and set MANPAGER='vim -M +MANPAGER --not-a-term -'; then :ShKeywordPrg (or K) will crap out and spew terminal garbage into less when bash's "help" fails. This was introduced by 2f25e40 (runtime: configure keywordpg for some file types (#5566), 2023-08-23) and may be present in other files touched by that commit.
Make the "man" invocation sensible by unsetting MANPAGER in the environment.