Skip to content

(RFC) add feature to overwrite default vim addons #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions plugin/localvimrc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ if !exists('g:local_vimrc') | let g:local_vimrc = {} | endif | let s:c = g:local
" configuration files. They rarely differ in name.
" Users will instantly understand what it does.
let s:c.names = get(s:c, 'names', ['.vimrc'])
let s:c.overwriter_names = get(s:c, 'overwriter_names', ['.overwrite.vimrc'])

let s:c.hash_fun = get(s:c,'hash_fun','LVRHashOfFile')
let s:c.cache_file = get(s:c,'cache_file', $HOME.'/.vim_local_rc_cache')
Expand Down Expand Up @@ -105,4 +106,6 @@ augroup LOCAL_VIMRC
if ! &autochdir
autocmd BufNewFile,BufRead * SourceLocalVimrcOnce
endif

autocmd VimEnter,BufNewFile,BufRead * call LVRWithCache('LVRRecurseUp', [getcwd(), s:c.overwriter_names] )
augroup end