Tue, 25 Jul 2017 23:51:00 -0400
drop sslsecure, degrades with many buffers
470 | 1 | |
580 | 2 | func! vimrc#AutoFmtToggle() abort |
470 | 3 | if &formatoptions =~ 'a' |
580 | 4 | setl fo-=a | echo '-a' |
470 | 5 | else |
580 | 6 | setl fo+=a | echo '+a' |
470 | 7 | endif |
580 | 8 | endfunc |
470 | 9 | |
586 | 10 | func! vimrc#Ltag(term) abort |
11 | exe "ltag " . a:term | |
12 | lopen | |
13 | endfunc | |
14 | ||
470 | 15 | " Make paths when writing, as necessary |
580 | 16 | func! vimrc#MkNonExDir(file, buf) abort |
470 | 17 | if empty(getbufvar(a:buf, '&buftype')) && a:file!~#'\v^\w+\:\/' |
18 | let dir=fnamemodify(a:file, ':h') | |
19 | if !isdirectory(dir) | |
20 | call mkdir(dir, 'p') | |
21 | endif | |
22 | endif | |
580 | 23 | endfunc |
470 | 24 | |
583 | 25 | func! vimrc#AutoSessionConfig() abort |
26 | if strlen(v:servername) > 0 && match(v:servername, 'VIM') == -1 | |
619 | 27 | exec 'UniteSessionLoad ' . tolower(v:servername) |
583 | 28 | endif |
29 | endfunc | |
30 | ||
580 | 31 | func! vimrc#VundleInstallAndBegin() abort |
607 | 32 | let bundlepath = g:myvim . '/bundle' |
33 | ||
34 | if !filereadable(bundlepath . '/vundle/README.md') | |
574
3874b97048b0
Move vundle install to func, switch to begin/end vundle interface
Meredith Howard <mhoward@roomag.org>
parents:
470
diff
changeset
|
35 | if !executable('git') |
3874b97048b0
Move vundle install to func, switch to begin/end vundle interface
Meredith Howard <mhoward@roomag.org>
parents:
470
diff
changeset
|
36 | echo "Can't autoinstall Vundle without git" |
3874b97048b0
Move vundle install to func, switch to begin/end vundle interface
Meredith Howard <mhoward@roomag.org>
parents:
470
diff
changeset
|
37 | return |
3874b97048b0
Move vundle install to func, switch to begin/end vundle interface
Meredith Howard <mhoward@roomag.org>
parents:
470
diff
changeset
|
38 | endif |
3874b97048b0
Move vundle install to func, switch to begin/end vundle interface
Meredith Howard <mhoward@roomag.org>
parents:
470
diff
changeset
|
39 | |
607 | 40 | if !isdirectory(bundlepath) |
41 | call mkdir(bundlepath, 'p') | |
42 | endif | |
43 | exec 'cd ' . bundlepath | |
606
37b21dd61717
simplify vundle install
Meredith Howard <mhoward@roomag.org>
parents:
586
diff
changeset
|
44 | silent !git clone --depth 1 https://github.com/gmarik/vundle |
37b21dd61717
simplify vundle install
Meredith Howard <mhoward@roomag.org>
parents:
586
diff
changeset
|
45 | cd - |
574
3874b97048b0
Move vundle install to func, switch to begin/end vundle interface
Meredith Howard <mhoward@roomag.org>
parents:
470
diff
changeset
|
46 | |
3874b97048b0
Move vundle install to func, switch to begin/end vundle interface
Meredith Howard <mhoward@roomag.org>
parents:
470
diff
changeset
|
47 | echo "Installed Vundle, run :PluginInstall if desired" |
3874b97048b0
Move vundle install to func, switch to begin/end vundle interface
Meredith Howard <mhoward@roomag.org>
parents:
470
diff
changeset
|
48 | endif |
579
0cb7adee16fe
move begin into function too
Meredith Howard <mhoward@roomag.org>
parents:
578
diff
changeset
|
49 | |
607 | 50 | let &rtp .= ',' . bundlepath . '/vundle' |
51 | call vundle#begin(bundlepath) | |
580 | 52 | endfunc |