mirror of
https://git.freebsd.org/ports.git
synced 2025-05-15 00:31:51 -04:00
Our FreeBSD vimrc has caused a lot of trouble. It seriously mangles config loading order (see below PR for the 21 comments it took before I could get my head around it), clobbers defaults, duplicates defaults, and simply isn't how Vim does things. In this patch, the system vimrc is dropped entirely. Instead, $VIMRUNTIME/defaults.vim sources $VIMRUNTIME/defaults_freebsd.vim, which contains only FreeBSD-specific settings (today, a convenience augroup for port creation, and a flag to let syntax/sh.vim know that /bin/sh isn't bash). There is no perfect solution here, but by not clobbering anything anymore, we at least don't *prevent* other solutions. You now get Vim's defaults, and you are free to override them in your ~/.vimrc. PR: 251420
10 lines
362 B
VimL
10 lines
362 B
VimL
let g:is_posix = 1 " Our /bin/sh is POSIX, not bash
|
|
|
|
" Load a port template when creating a Makefile under the ports tree
|
|
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
|