Index: editors/Makefile =================================================================== --- editors/Makefile +++ editors/Makefile @@ -252,6 +252,7 @@ SUBDIR += vigor SUBDIR += vile SUBDIR += vim + SUBDIR += vim-config SUBDIR += vim-lite SUBDIR += winefish SUBDIR += wordgrinder Index: editors/vim-config/Makefile =================================================================== --- /dev/null +++ editors/vim-config/Makefile @@ -0,0 +1,23 @@ +# Created by: David O'Brien +# $FreeBSD$ + +PORTNAME= vim-config +PORTVERSION= 1.0 +#PORTREVISION?= 0 +CATEGORIES?= editors + +MAINTAINER?= alfred@FreeBSD.org +COMMENT?= Default vimrc. + +# we are just installing files. +ALL_TARGET= +DISTFILES= +DATADIR= ${PREFIX}/share/vim + +do-build: + +do-install: + ${MKDIR} ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${FILESDIR}/vimrc ${STAGEDIR}${DATADIR} + +.include Index: editors/vim-config/files/vimrc =================================================================== --- /dev/null +++ editors/vim-config/files/vimrc @@ -0,0 +1,49 @@ +" Uncomment the next line to make Vim more Vi-compatible +" From ubuntu's vimrc, slightly modified for FreeBSD ports. +"set compatible + +" Vim5 and later versions support syntax highlighting. Uncommenting the next +" line enables syntax highlighting by default. +if has("syntax") + syntax on +endif + +" This is the problem most of the time. +set nocompatible + +" Sensible backspace setting, seems to work on most terminals. +set backspace=2 + +" If using a dark background within the editing area and syntax highlighting +" turn on this option as well +"set background=dark + +" Uncomment the following to have Vim jump to the last position when +" reopening a file +"if has("autocmd") +" au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif +"endif + +" Uncomment the following to have Vim load indentation rules and plugins +" according to the detected filetype. +"if has("autocmd") +" filetype plugin indent on +"endif + +" The following are commented out as they cause vim to behave a lot +" differently from regular Vi. They are highly recommended though. +"set showcmd " Show (partial) command in status line. +"set showmatch " Show matching brackets. +"set ignorecase " Do case insensitive matching +"set smartcase " Do smart case matching +"set incsearch " Incremental search +"set autowrite " Automatically save before commands like :next and :make +"set hidden " Hide buffers when they are abandoned +"set mouse=a " Enable mouse usage (all modes) + +" Source a global configuration file if available +if filereadable($VIMRUNTIME . "/vimrc") + source $VIMRUNTIME . "/vimrc" +endif + + Index: editors/vim-config/pkg-descr =================================================================== --- /dev/null +++ editors/vim-config/pkg-descr @@ -0,0 +1,4 @@ +Enable a light default set of options for Vim. + +Without this port, vim runs in old vi-compatible mode which +makes it very unfriendly for most new users. Index: editors/vim-config/pkg-plist =================================================================== --- /dev/null +++ editors/vim-config/pkg-plist @@ -0,0 +1 @@ +share/vim/vimrc Index: editors/vim/Makefile =================================================================== --- editors/vim/Makefile +++ editors/vim/Makefile @@ -20,13 +20,14 @@ PATCH_DEPENDS= ${LOCALBASE}/bin/gpatch:${PORTSDIR}/devel/patch -OPTIONS_DEFINE= CSCOPE EXUBERANT_CTAGS LUA NLS PERL PYTHON RUBY TCL XTERM_SAVE +OPTIONS_DEFINE= CSCOPE EXUBERANT_CTAGS LUA NLS PERL PYTHON RUBY TCL XTERM_SAVE DEFAULT_VIMRC OPTIONS_SINGLE= UI OPTIONS_SINGLE_UI= ATHENA CONSOLE GNOME GTK2 MOTIF X11 OPTIONS_SUB= yes ATHENA_DESC= Athena GUI toolkit CSCOPE_DESC= cscope support CONSOLE_DESC= Console/terminal mode +DEFAULT_VIMRC_DESC= Install a default vimrc for new users EXUBERANT_CTAGS_DESC= Use exctags instead of ctags UI_DESC= User interface XTERM_SAVE_DESC= Restore xterm screen after exit @@ -88,6 +89,8 @@ PLIST_SUB+= NON_LITE="" .endif +OPTIONS_DEFAULT+= DEFAULT_VIMRC + ATHENA_MAKE_ARGS= CONF_OPT_GUI=--enable-gui=athena ATHENA_USE= XORG=xaw CONSOLE_MAKE_ARGS= CONF_OPT_GUI="--enable-gui=no --without-x" @@ -121,6 +124,10 @@ IGNORE= this port has new UI option (CONSOLE) for users who do not need GUI support. Please run "make config" to modify your setting .endif +.if ${PORT_OPTIONS:MDEFAULT_VIMRC} +RUN_DEPENDS+= ${LOCALBASE}/share/vim/vimrc:${PORTSDIR}/editors/vim-config +.endif + .if ${PORT_OPTIONS:MCONSOLE} || ${PORT_OPTIONS:MX11} PLIST_SUB+= GUI="@comment " .else