Created attachment 201347 [details]
editors/vim: Default to python3
* Include PYTHON3 in OPTIONS_DEFAULT instead of PYTHON2
poudriere: OK -- testport on 11.2 amd64
Is there a reason to switch to python3 now? In my mind, it makes more sense to switch once PYTHON_DEFAULT becomes 3.x (which is currently being worked on). Until then, I think that vim should probably use the same default that the ports tree does.
(In reply to Adam Weinberger from comment #1)
editors/vim doesn't inherit a python version through DEFAULT_VERSIONS from the ports machinery. Why, then, should it be constrained to remain synchronized with whatever the ports default is (or whatever the user selects as the global default)? If you want to use the same default the ports tree does, which seems sensible, then do that. Would you like me to draft a patch to make that change instead?
(In reply to John W. O'Brien from comment #2)
I agree that PYTHON3 should be the default, just like I think python3.6 should be the PYTHON_DEFAULT. Luckily, the latter change is coming soon. There have been multiple exp-runs and prep-work is being done to facilitate the switch. I'll switch the Vim default at that time.
The problem with changing the default now is that it only really affects pkg users. DEFAULT_VERSIONS only applies to people building from source, in which case they can make config and set PYTHON3 themselves. OPTIONS_DEFAULT is supposed to be deterministic, so I wouldn't want to change it based on DEFAULT_VERSIONS. Hopefully the point will become moot soon when the PYTHON_DEFAULT switch happens.
(In reply to Adam Weinberger from comment #3)
I get why, given that editors/vim doesn't inherit from DEFAULT_VERSIONS, you don't want to be out of step with the stock default. I still think that said "given" is a problem, impinging on POLA violation territory---in my environment, editors/vim is the *only* port that still depended on python2 after I set python=3.6. I also recognize that vim doesn't fall into any of the common python dependency cases, insofar as it treats python2 and python2 as equal and independent, just like perl and ruby.
What I'm looking for at this point is a way to use DEFAULT_VERSIONS to affect the default OPTIONS for editors/vim, such that python=2.x gets PYTHON2 and python=3.x gets PYTHON3, unless OPTIONS are explicitly set to override. I'm not sure that the ports machinery admits this or something like this, but I do think that this case is a valid need.
For the sake of argument and illustration, why not steadfastly stick to PYTHON3 when the port builder has expressed no general preference, instead of steadfastly sticking to PYTHON2 when the port builder has clearly expressed a general preference?
A commit references this bug:
Date: Sat Jun 1 14:35:56 UTC 2019
New revision: 503239
Update to Vim to patchlevel 1439, change default python, improve vimrc
Some big changes in this update:
* Patchlevel 1439
* Default python is now 3.x instead of 2.x 
* Expose DEFAULT_VIMRC option (on by default) to vim-tiny
Also, many changes to the default vimrc. Any changes necessarily risk
contention, but then I remembered that I actually maintain editors/vim,
so here we are. The idea here is that Vim, by default, behaves like Vi,
and people who install the Vim port do so because they DON'T just want
Vi. I've enabled features that are basic quality-of-life settings for
me, and that I hope will be ideal for most end-users.
Important changes in the default vimrc:
* Don't install gvimrc at all. gvim should load $ETCDIR/vimrc anyway. I
can't test gvim locally, so someone please let me know if I broke it.
* Turn on autoindent
* Disable console bells entirely. Console bells are terrible.
* Enable incsearch: highlights search results as you type them
* ^L clears search highlights while redrawing the screen
* Assume fast terminal by default
* Explain every setting in comments
Many of these settings are modeled after the defaults in NeoVim, which
really got it right. I want our default vimrc to be usable and ideal,
so please let me know if anything doesn't work for you, or if you have
other settings you'd like to see changed in the default.
In particular, please let me know if I broke gvim by removing the gvimrc!
PR: 235142 
Submitted by: John W. O'Brien 
I've committed the switch to PYTHON3 as default. It should have been committed in last month's update, but I completely forgot. Sorry about that extra delay here. Thanks for the bug report and patch, John.