6 " on windows and not cygwin |
6 " on windows and not cygwin |
7 let s:on_windows=(has('win32') || has('win64')) |
7 let s:on_windows=(has('win32') || has('win64')) |
8 let s:filename=expand('<sfile>') |
8 let s:filename=expand('<sfile>') |
9 |
9 |
10 " Set up Vundle and plugins {{{ |
10 " Set up Vundle and plugins {{{ |
11 let s:installed_vundle=0 |
11 call vimrc#VundleInstall() |
12 |
|
13 let s:vundle_readme=expand(s:on_windows |
|
14 \ ? '~/vimfiles/bundle/vundle/README.md' |
|
15 \ : '~/.vim/bundle/vundle/README.md') |
|
16 |
|
17 if !filereadable(s:vundle_readme) |
|
18 if !executable('git') |
|
19 echo "You probably want git installed and in PATH." |
|
20 quit |
|
21 endif |
|
22 |
|
23 echo "Installing Vundle and Plugins...\n" |
|
24 if s:on_windows == 0 |
|
25 silent !mkdir -p ~/.vim/bundle |
|
26 silent !git clone --depth 1 https://github.com/gmarik/vundle ~/.vim/bundle/vundle |
|
27 else |
|
28 silent execute '!mkdir "'. $HOME .'\vimfiles\bundle"' |
|
29 silent execute '!git clone --depth 1 https://github.com/gmarik/vundle "'. $HOME .'\vimfiles\bundle\vundle"' |
|
30 endif |
|
31 let s:installed_vundle=1 |
|
32 endif |
|
33 |
12 |
34 if s:on_windows == 0 |
13 if s:on_windows == 0 |
35 set rtp+=~/.vim/bundle/vundle/ |
14 set rtp+=~/.vim/bundle/vundle/ |
36 call vundle#rc() |
15 call vundle#begin() |
37 else |
16 else |
38 set rtp+=~/vimfiles/bundle/vundle/ |
17 set rtp+=~/vimfiles/bundle/vundle/ |
39 call vundle#rc('~/vimfiles/bundle') |
18 call vundle#begin('~/vimfiles/bundle') |
40 endif |
19 endif |
41 |
20 |
42 Plugin 'gmarik/vundle' |
21 Plugin 'gmarik/vundle' |
43 |
22 |
44 Plugin 'vim-airline/vim-airline' |
23 Plugin 'vim-airline/vim-airline' |
82 try |
61 try |
83 execute 'source ' . s:filename . '.local-pre' |
62 execute 'source ' . s:filename . '.local-pre' |
84 catch |
63 catch |
85 endtry |
64 endtry |
86 |
65 |
87 if s:installed_vundle == 1 |
66 call vundle#end() |
88 echo "Installing Plugins, please ignore key map error messages\n" |
|
89 :PluginInstall |
|
90 endif |
|
91 " }}} |
67 " }}} |
92 |
68 |
93 |
69 |
94 " Key maps {{{ |
70 " Key maps {{{ |
95 |
|
96 nmap <silent> <F1> :Unite buffer<CR> |
71 nmap <silent> <F1> :Unite buffer<CR> |
97 nmap <silent> <C-F1> :Unite -quick-match -short-source-names window tab:no-current<CR> |
72 nmap <silent> <C-F1> :Unite -quick-match -short-source-names window tab:no-current<CR> |
98 nmap <silent> <A-F1> :Unite session<CR> |
73 nmap <silent> <A-F1> :Unite session<CR> |
99 nmap <silent> <F2> :VimFilerExplorer<CR> |
74 nmap <silent> <F2> :VimFilerExplorer<CR> |
100 nmap <silent> <C-F2> :Unite -start-insert file_rec/async:!<CR> |
75 nmap <silent> <C-F2> :Unite -start-insert file_rec/async:!<CR> |