Bug 219941

Summary: editors/vim usability regression, at least for vim-lite users -> new port editors/vim7
Product: Ports & Packages Reporter: Harald Schmalzbauer <bugzilla.freebsd>
Component: Individual Port(s)Assignee: Adam Weinberger <adamw>
Status: Closed Works As Intended    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (adamw)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Update vim-7.4.2367 as separate vim7 port.
none
Also make vim7-lite available
none
Alternate, complete shar for editors/vim7 none

Description Harald Schmalzbauer 2017-06-12 12:57:01 UTC
Why a new port editors/vim7?

At some point, vim-lite auto-enabled "visual" mode when selecting text with the mouse.
Having used vim-lite from ports for many years out of the box, I was very annoyed especially since the upstream documentation is horrible, at least for non participating developers.

Recently, the out-of-box config additionally resulted in a ESC delay (made cursor keys behaving differently until timeout passed ?!?), which made vim-lite completely unusable for me.
Lots of confusing blogs/sources mentioned different solutions/things to blame.  After I spent a decent amount of time trying to find a reason why I'm forced to manually intercept to get vim back to the last-15-years-behaviour, I spent more time looking at competitors – with only joe fitting my CLI needs.  But I'm quiet quick with vi for my tasks and don't see a chance ever reaching the same efficiency with joe (jmacs).

So I went back to vim and decided to create an inofficial vim7 port, to avoid any upcoming operational surprises. 

Simply checked out r422333, the last 7-version (7.4.2367 which already had the visual-mode defaults.vim, introduced at any point after 7.4.1832) and incorporated the "official" patches for CVE-2016-1248 and CVE-2017-5953.

Most important, the FreeBSD port specific vimrc was extended by 'let skip_defaults_vim = 1'.

The latter is one easy solution to get rid of the 2016 introduced heavy usage regression, at least for vim-lite users.
So I'm voting for inclusion in editors/vim.

Whether people might need/want vim7 in the official ports tree is beyond my scope.
If so, here's a skeleton to start (will add different attachments in separate comment, since I can only attach one file here?).  Decision should be descussed with recent and current vim maintainers I guess.

-harry
Comment 1 Harald Schmalzbauer 2017-06-12 13:01:15 UTC
Created attachment 183429 [details]
Update vim-7.4.2367 as separate vim7 port.

Resurrect vim-7.4.2367 (r422333) from svn, move directory from editors/vim to editors/vim7 and apply patch to address CVE-2016-1248 and CVE-2016-1248 and revert usability regression by extending FreeBSD 'vimrc' to skip defaults.vim.
Comment 2 Harald Schmalzbauer 2017-06-12 13:01:52 UTC
Created attachment 183430 [details]
Also make vim7-lite available
Comment 3 Harald Schmalzbauer 2017-06-12 13:03:25 UTC
Created attachment 183431 [details]
Alternate, complete shar for editors/vim7

shar of editors/vim7 and editors/vim7-lite
Comment 4 Adam Weinberger freebsd_committer freebsd_triage 2017-06-12 18:02:23 UTC
Wouldn't remapping <C-Up> etc. be simpler than installing an old, unsupported version that receives neither stability nor security fixes?

I can see that you put a lot of work into these ports, Harald, but I would vote against ports for old versions.

That said, the behaviour of C-ArrowKey is clearly ridiculous and I would happily incorporate a patch for the default vimrc to map those keys to something expected.
Comment 5 Adam Weinberger freebsd_committer freebsd_triage 2017-06-12 18:08:03 UTC
Sorry, not <C-Up>. It'd be something like:

map  <ESC>[1;3A <ESC><Up>
map! <ESC>[1;3A <ESC><Up>
Comment 6 Harald Schmalzbauer 2017-06-12 18:40:11 UTC
I agree with you regarding the "old" version!

In this case I thought it might be less time consuming and less frustrating going back to something which is proven to work (at least with my very limited set of utilized features) and more likely to be persistent.
Normally, spending that time to find the "real" solution seems to be the better approach, but at some point, experience tells me, that once a project leaves the tracks I'm able to follow (meaning decisions were taken that I don't understand in any way), the "real" fix is no good invest since other fixes will be needed shortly.

That was the reason why I wanted to have the fallback version ready, regardless if the current version gets fixed.  If the latter happens, I have always a quick way back in case such surprises show up again.

So I'm fine if you drop that vim7 port!
But I'd like to see the 'let skip_defaults_vim = 1' setting making it into the global vimrc.

Hopefully you or someone else can find a solution to the ESC-remapping problem in vim8 (which I unfortunately don't have time for since I'm lagging more than 3 months with my actual job and money runs out slowly...) 

Thanks,

-harry
Comment 7 Adam Weinberger freebsd_committer freebsd_triage 2018-05-18 15:50:10 UTC
I'm closing this out. I recognize that the current behaviour is not what you're expecting, but I don't want to patch the global vimrc. It makes more sense for you to put that in your own vimrc instead.