-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vimrc.plugin
63 lines (49 loc) · 1.64 KB
/
.vimrc.plugin
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
let $CACHE = expand('~/.cache')
if !isdirectory($CACHE)
call mkdir($CACHE, 'p')
endif
if &runtimepath !~# '/dein.vim'
let s:dein_dir = fnamemodify('dein.vim', ':p')
if !isdirectory(s:dein_dir)
let s:dein_dir = $CACHE .. '/dein/repos/github.com/Shougo/dein.vim'
if !isdirectory(s:dein_dir)
execute '!git clone https://github.com/Shougo/dein.vim' s:dein_dir
endif
endif
execute 'set runtimepath^=' .. substitute(
\ fnamemodify(s:dein_dir, ':p') , '[/\\]$', '', '')
endif
" Ward off unexpected things that your distro might have made, as
" well as sanely reset options when re-sourcing .vimrc
set nocompatible
" Set dein base path (required)
let s:dein_base = '~/.cache/dein/'
" Set dein source path (required)
let s:dein_src = '~/.cache/dein/repos/github.com/Shougo/dein.vim'
" Set dein runtime path (required)
execute 'set runtimepath+=' .. s:dein_src
" Call dein initialization (required)
call dein#begin(s:dein_base)
call dein#add(s:dein_src)
" Your plugins go here:
"call dein#add('Shougo/neosnippet.vim')
"call dein#add('Shougo/neosnippet-snippets')
" TODO: plugins
call dein#add('preservim/nerdtree')
" Finish dein initialization (required)
call dein#end()
" Attempt to determine the type of a file based on its name and possibly its
" contents. Use this to allow intelligent auto-indenting for each filetype,
" and for plugins that are filetype specific.
filetype indent plugin on
" Enable syntax highlighting
if has('syntax')
syntax on
endif
" Uncomment if you want to install not-installed plugins on startup.
if dein#check_install()
call dein#install()
endif
" Plugin settings
" nerdtree
map <C-n> :NERDTreeToggle<CR>