Date: Sat, 1 Jun 2019 14:35:55 +0000 (UTC) From: Adam Weinberger <adamw@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r503239 - in head/editors/vim: . files Message-ID: <201906011435.x51EZtDq026139@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adamw Date: Sat Jun 1 14:35:55 2019 New Revision: 503239 URL: https://svnweb.freebsd.org/changeset/ports/503239 Log: 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 [1] * 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 [1] Submitted by: John W. O'Brien [1] Deleted: head/editors/vim/files/patch-src_po_Makefile Modified: head/editors/vim/Makefile head/editors/vim/distinfo head/editors/vim/files/vimrc head/editors/vim/pkg-plist Modified: head/editors/vim/Makefile ============================================================================== --- head/editors/vim/Makefile Sat Jun 1 13:58:51 2019 (r503238) +++ head/editors/vim/Makefile Sat Jun 1 14:35:55 2019 (r503239) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= vim -PORTVERSION= 8.1.1248 +PORTVERSION= 8.1.1439 DISTVERSIONPREFIX= v CATEGORIES= editors @@ -14,11 +14,11 @@ LICENSE_NAME= VIM License LICENSE_FILE= ${WRKSRC}/runtime/doc/uganda.txt LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept -CONFLICTS_INSTALL?= vim-console vim-tiny - USES= cpe iconv ncurses pkgconfig shebangfix USE_GITHUB= yes +CONFLICTS_INSTALL?= vim-console vim-tiny + CONFIGURE_ARGS= --enable-gui=${GUI} \ --enable-multibyte \ --with-tlib=ncurses @@ -38,7 +38,7 @@ VIM_VER= ${PORTNAME}${PORTVERSION:R:S|.||g} # OPTIONS # ### Make sure any new options are excluded below in CONSOLE/TINY -OPTIONS_DEFAULT= CSCOPE DEFAULT_VIMRC CTAGS_EXUBERANT GTK3 PERL PYTHON2 RUBY +OPTIONS_DEFAULT= CSCOPE DEFAULT_VIMRC CTAGS_EXUBERANT GTK3 PERL PYTHON3 RUBY OPTIONS_DEFINE= CSCOPE DEFAULT_VIMRC NLS XTERM_SAVE OPTIONS_SINGLE= CTAGS UI OPTIONS_SINGLE_CTAGS= CTAGS_BASE CTAGS_EXUBERANT CTAGS_UNIVERSAL @@ -47,20 +47,13 @@ OPTIONS_GROUP= LANGBIND OPTIONS_GROUP_LANGBIND= LUA PERL PYTHON2 PYTHON3 RUBY SCHEME TCL OPTIONS_SUB= yes -.if defined(CONSOLE) -OPTIONS_DEFAULT= DEFAULT_VIMRC +.if defined(CONSOLE) || defined(TINY) OPTIONS_SLAVE= CONSOLE # Exclude everything except the two options above OPTIONS_EXCLUDE:= ${OPTIONS_DEFINE:NDEFAULT_VIMRC} \ ${OPTIONS_SINGLE_UI:NCONSOLE} \ ${OPTIONS_GROUP_LANGBIND} \ ${OPTIONS_SINGLE_CTAGS} -.elif defined(TINY) -OPTIONS_SLAVE= CONSOLE -OPTIONS_EXCLUDE:= ${OPTIONS_DEFINE} \ - ${OPTIONS_SINGLE_UI:NCONSOLE} \ - ${OPTIONS_GROUP_LANGBIND} \ - ${OPTIONS_SINGLE_CTAGS} .endif DEFAULT_VIMRC_DESC= Install bundled vimrc as default setting @@ -171,6 +164,10 @@ post-configure: # Needed when devel/libsysinfo is installed: @${REINPLACE_CMD} -e '/#define HAVE_SYSINFO 1/ d' ${WRKSRC}/src/auto/config.h +post-install-DEFAULT_VIMRC-on: + @${MKDIR} ${STAGEDIR}${ETCDIR} + ${INSTALL_DATA} ${FILESDIR}/vimrc ${STAGEDIR}${ETCDIR}/vimrc.sample + .if !defined(TINY) post-install: @${RM} ${STAGEDIR}${PREFIX}/bin/ex @@ -196,11 +193,6 @@ post-patch-LUA-on: post-patch-XTERM_SAVE-on: @${REINPLACE_CMD} -e '/FEAT_XTERM_SAVE/ s|.*|#define FEAT_XTERM_SAVE|' ${WRKSRC}/src/feature.h - -post-install-DEFAULT_VIMRC-on: - @${MKDIR} ${STAGEDIR}${ETCDIR} - ${SED} -e '/set nocompatible/d' ${FILESDIR}/vimrc > ${STAGEDIR}${ETCDIR}/gvimrc.sample - ${INSTALL_DATA} ${FILESDIR}/vimrc ${STAGEDIR}${ETCDIR}/vimrc.sample post-install-NLS-off: @${MKDIR} ${STAGEDIR}${DATADIR}/${VIM_VER}/lang Modified: head/editors/vim/distinfo ============================================================================== --- head/editors/vim/distinfo Sat Jun 1 13:58:51 2019 (r503238) +++ head/editors/vim/distinfo Sat Jun 1 14:35:55 2019 (r503239) @@ -1,3 +1,3 @@ -TIMESTAMP = 1556841484 -SHA256 (vim-vim-v8.1.1248_GH0.tar.gz) = 5caa9b9d59bcfe172406352269ee5bc9d2d2837cf91eb937419454e0e9cc9a0e -SIZE (vim-vim-v8.1.1248_GH0.tar.gz) = 14166070 +TIMESTAMP = 1559398078 +SHA256 (vim-vim-v8.1.1439_GH0.tar.gz) = f1dc6c76175bbe655686a418d50f46ce0c771b7702cb26d2ee32fd6dccc6ecde +SIZE (vim-vim-v8.1.1439_GH0.tar.gz) = 14284028 Modified: head/editors/vim/files/vimrc ============================================================================== --- head/editors/vim/files/vimrc Sat Jun 1 13:58:51 2019 (r503238) +++ head/editors/vim/files/vimrc Sat Jun 1 14:35:55 2019 (r503239) @@ -1,24 +1,34 @@ -if v:lang =~ "utf8$" || v:lang =~ "UTF-8$" - set fileencodings=ucs-bom,utf-8,latin1 -endif +set nocompatible " Enable Vim mode (instead of vi emulation) -let g:is_posix = 1 -set nocompatible -set bs=indent,eol,start -set history=50 -set ruler +let g:is_posix = 1 " Our /bin/sh is POSIX, not bash +set autoindent " Intelligent indentation matching +set autoread " Update the file if it's changed externally +set backspace=indent,eol,start " Allow backspacing over anything +set belloff=all " Turn off bells +set display=truncate " Show '@@@' when the last screen line overflows +set formatoptions+=j " Delete comment char when joining lines +set history=100 " Undo up to this many commands +set hlsearch " Highlight search results +set incsearch " Highlight search matches as you type them +set ruler " Show cursor position +set ttyfast " Redraw faster for smoother scrolling +set wildmenu " Show menu for tab completion in command mode -if &t_Co > 2 || has("gui_running") - syntax on - set hlsearch -endif +try + syntax on " Enable syntax highlighting +catch | endtry " vim-tiny is installed without the syntax files -if has("autocmd") - augroup freebsd - autocmd! - if $PORTSDIR != "" - autocmd BufNewFile $PORTSDIR/*/*/Makefile 0r $PORTSDIR/Templates/Makefile - else - autocmd BufNewFile /usr/ports/*/*/Makefile 0r /usr/ports/Templates/Makefile - endif +if v:lang =~ "utf8$" || v:lang =~ "UTF-8$" + set fileencodings=ucs-bom,utf-8,latin1 endif + +" CTRL-L will mute highlighted search results +nnoremap <silent> <C-l> :<C-u>nohlsearch<CR><C-l> + +augroup FreeBSD + autocmd! + autocmd BufNewFile /usr/ports/*/*/Makefile 0r /usr/ports/Templates/Makefile + if !empty($PORTSDIR) + autocmd BufNewFile $PORTSDIR/*/*/Makefile 0r $PORTSDIR/Templates/Makefile + endif +augroup END Modified: head/editors/vim/pkg-plist ============================================================================== --- head/editors/vim/pkg-plist Sat Jun 1 13:58:51 2019 (r503238) +++ head/editors/vim/pkg-plist Sat Jun 1 14:35:55 2019 (r503239) @@ -63,7 +63,6 @@ bin/xxd %%NLS%%man/de.UTF-8/man1/rview.1.gz %%NLS%%man/de.UTF-8/man1/rvim.1.gz %%NLS%%man/de.UTF-8/man1/vim.1.gz -%%DEFAULT_VIMRC%%@sample %%ETCDIR%%/gvimrc.sample %%DEFAULT_VIMRC%%@sample %%ETCDIR%%/vimrc.sample %%GUI%%%%NLS%%man/fr/man1/eview.1.gz %%NLS%%man/fr/man1/evim.1.gz
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906011435.x51EZtDq026139>