-
Notifications
You must be signed in to change notification settings - Fork 30
/
trusted-local
36 lines (27 loc) · 930 Bytes
/
trusted-local
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
" " Trusted Local
" "--------------
" autocmd VimEnter * call s:LoadTrustedVimrcLocal()
" autocmd BufWrite .vimrc.local call s:TrustVimrcLocal()
" let s:GIT_SAFE_DIR = ".git/safe"
" let s:VIMRC_LOCAL = ".vimrc.local"
" function! s:TrustVimrcLocal()
" if isdirectory('.git') && !isdirectory(s:GIT_SAFE_DIR)
" call mkdir(s:GIT_SAFE_DIR)
" endif
" endfunction
" function! s:LoadTrustedVimrcLocal()
" let s:trused_local_path = s:GIT_SAFE_DIR . "/../../" . s:VIMRC_LOCAL
" if filereadable(s:trused_local_path)
" execute "source " . s:trused_local_path
" endif
" endfunction
" function! s:EditVimrcLocal()
" execute "edit " . s:VIMRC_LOCAL
" endfunction
" function! s:SmartSplit()
" let split_cmd = (winwidth(0) >= 100) ? 'vsplit' : 'split'
" execute split_cmd . " " . s:VIMRC_LOCAL
" endfunction
" command! EditVimrcLocal call <sid>SmartSplit()
" nnoremap <leader>el :EditVimrcLocal<cr>
" " vim:ft=vim