-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
89 lines (69 loc) · 2.17 KB
/
Copy pathvimrc
File metadata and controls
89 lines (69 loc) · 2.17 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" File:
" ${HOME}/.vim/vimrc
"
" Maintainer:
" Heiko Klausing (h.klausing@gmx.de)
"
" Version:
" 0.0.1 - 2017-08-31
"
" Purpose:
" This file contains the minimal settings to set the foundation,
" with the majority of the configuration and settings living in
" files spread between vim/rcfiles and vim/rcplugins
"
" Preparation:
" Prepare_vim-plug:
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
"
" Prepare font:
"
" Links:
" - https://github.com/akrawchyk/awesome-vim
"
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if has('vim_starting')
set nocompatible " Be iMproved
endif
" Location of plugin manager vim-plug
let vimplug_exists=expand('~/.vim/autoload/plug.vim')
" Load plugin manager vim-plug
if !filereadable(vimplug_exists)
if !executable("curl")
echoerr "You have to install curl or first install vim-plug yourself!"
execute "q!"
endif
echo "Installing Vim-Plug..."
echo ""
silent !\curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
let g:not_finish_vimplug = "yes"
autocmd VimEnter * PlugInstall
endif
" Source all files in a indicated directory with extension .vim
function! s:SourceConfigFilesIn(directory)
let directory_splat = '~/.vim/' . a:directory . '/*.vcfg'
for config_file in split(glob(directory_splat), '\n')
if filereadable(config_file)
" Enable next line to see which files are loaded.
"echo "execute 'source'" . config_file
execute 'source' config_file
endif
endfor
endfunction
" Make Vim behave in a more useful way
set nocompatible
" Need to set the leader before defining any leader mappings
let mapleader = ','
" Insert vim plugins with additional setting
call plug#begin('~/.vim/bundle')
call s:SourceConfigFilesIn('setup/plugins')
call plug#end()
" Insert vim settings
call s:SourceConfigFilesIn('setup/files')
" Local config
if filereadable($HOME . '/.vimrc.local')
source ~/.vimrc.local
endif
" vim:tabstop=2 shiftwidth=2 softtabstop=2 expandtab