forked from chncwang/vimrcs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
180 lines (159 loc) · 4.17 KB
/
.vimrc
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
let osx = 'OS X'
let linux = 'Linux'
set nocp
let s:cpo_save=&cpo
set cpo&vim
let &cpo=s:cpo_save
unlet s:cpo_save
set background=dark
set backspace=indent,eol,start
set expandtab
set encoding=utf-8
set fileencodings=ucs-bom,utf-8,default,latin1
set guifont=Monaco\ 12
set helplang=en
set langmenu=none
set autoindent
set mouse=a
set printexpr=system('open\ -a\ Preview\ '.v:fname_in)\ +\ v:shell_error
set shiftwidth=4
set smartindent
set nocindent
set autoindent
set softtabstop=4
set termencoding=utf-8
set number
set ruler
inoremap jj <ESC>
set incsearch
filetype plugin on
filetype indent on
syntax on
set autowrite
let os = linux
let s:uname = system("echo -n \"$(uname)\"")
if s:uname == "Darwin"
let os = osx
endif
if os == linux
let ctags = '/usr/bin/ctags'
command Ct !ctags -R --c++-kinds=+p --fields=+iaS --extra=+q . /usr/include/c++/4.6 /usr/include/c++/4.6/x86_64-linux-gnu /usr/include/c++/4.6/backward /usr/lib/gcc/x86_64-linux-gnu/4.6/include /usr/local/include /usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed /usr/include/x86_64-linux-gnu /usr/include 2>&1 &
else
let ctags = '/usr/local/bin/ctags'
if (has("gui_running"))
colors evening
endif
endif
" NERDTree
"======================================================
let g:NERDTree_title="[NERDTree]"
function! NERDTree_Start()
exec 'NERDTree'
endfunction
function! NERDTree_IsValid()
return 1
endfunction
let NERDChristmasTree=0
let NERDTreeShowBookmarks=1
let NERDTreeShowFiles=1
let NERDTreeShowLineNumbers=1
let NERDTreeMinimalUI=1
let NERDTreeChDirMode=2
let NERDTreeMouseMode=1
command Nt NERDTree
"======================================================
nmap th <C-w>h
nmap tl <C-w>l
nmap tk <C-w>k
nmap tj <C-w>j
nmap tr <C-w><C-r>
nmap tn :tnext<CR>
nmap tp :tprevious<CR>
nmap rjv 20<C-w>>2<C-w>l22<C-w><2<C-w>h
function BuildIde()
TlistToggle
Nt
endfunction
function BuildJava()
set cc=100
TlistToggle
Nt
endfunction
command Ide call BuildIde()
command Java call BuildJava()
command Tu TlistUpdate
command Tt TlistToggle
command Rb ReadBookmarks
command Sn set number
command Lm ListMethods
command Bm BuildMethods
command Ha help alternate.txt
command Ht help taglist.txt
command Hl help luasupport.txt
command Hn help nerd_tree.txt
command Ho help omnicppcomplete
command Hs help snipmate
command Hc help csupport
command Rc e ~/.vimrc
command Jj inoremap jj <ESC>
command Uj unmap! jj
command Db %s/\s\+$//
command Oc set cc=80
command Cc set cc=0
" Vundle
"======================================================
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
" window
Plugin 'scrooloose/nerdtree'
Plugin 'vim-scripts/taglist.vim'
" auto complete
Plugin 'vim-scripts/AutoComplPop'
Plugin 'ervandew/supertab'
" quick edit
Plugin 'hrp/EnhancedCommentify'
" refactoring
Plugin 'vim-scripts/EasyGrep'
" C++
Plugin 'vim-scripts/OmniCppComplete'
Plugin 'vim-scripts/a.vim'
Plugin 'vimscript/c-support'
" python
Plugin 'davidhalter/jedi-vim'
Plugin 'vim-scripts/pylint.vim'
" lua
Plugin 'vim-scripts/lua-support'
call vundle#end()
filetype plugin indent on
"======================================================
" OmniCpp configs.
"======================================================
let OmniCpp_NamespaceSearch = 2
let OmniCpp_ShowPrototypeInAbbr = 1
let OmniCpp_DefaultNamespaces = ["std", "cocos2d", "boost", "map"]
let OmniCpp_MayCompleteScope = 1
"======================================================
" TagList configs.
"======================================================
let Tlist_Ctags_Cmd=ctags
let Tlist_Auto_Open=0
let Tlist_Process_File_Always=1
let Tlist_File_Fold_Auto_Close=1
let Tlist_Sort_Type="order"
let Tlist_WinWidth=60
let Tlist_Compact_Format=1
let Tlist_Enable_Fold_Column=0
let Tlist_Display_Prototype=1
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=0
let Tlist_Use_Right_Window=1
"======================================================
" jedi(python auto complete plugin)
"======================================================
let g:jedi#auto_vim_configuration = 0
let g:jedi#use_splits_not_buffers = "left"
let g:jedi#popup_select_first = 0
"======================================================