mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-14 07:43:06 +00:00
A nice default vimrc for new users.
Otherwise users get "vi compat mode" which gives very old and unfriendly vi defaults that breaks arrow keys and backspace as well as no color. Expert users can disable this default vimrc via "make config". Approved by: delphij
This commit is contained in:
parent
fe67afe3c8
commit
e5c1be36f4
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=372622
@ -20,13 +20,14 @@ COMMENT?= Improved version of the vi editor
|
||||
|
||||
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 @@ MAKE_ARGS+= CONF_OPT_FEAT=--with-features=big \
|
||||
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 @@ X11_USE= XORG=x11,xt
|
||||
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}
|
||||
DEFAULT_VIMRC_LOCATION=${PREFIX}/share/vim
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MCONSOLE} || ${PORT_OPTIONS:MX11}
|
||||
PLIST_SUB+= GUI="@comment "
|
||||
.else
|
||||
@ -183,5 +190,8 @@ post-install:
|
||||
.endif
|
||||
${INSTALL_DATA} ${FILESDIR}/vietnamese_viscii.vim ${STAGEDIR}${DATADIR}/${VIM_VER}/keymap/
|
||||
${TOUCH} ${STAGEDIR}${DATADIR}/${VIM_VER}/lang/.keepme
|
||||
.if ${PORT_OPTIONS:MDEFAULT_VIMRC}
|
||||
${INSTALL_DATA} ${FILESDIR}/vimrc ${STAGEDIR}${DEFAULT_VIMRC_LOCATION}/vimrc
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
49
editors/vim/files/vimrc
Normal file
49
editors/vim/files/vimrc
Normal file
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user