Skip to content

Commit fb5b9af

Browse files
committed
final version
1 parent 6b3906f commit fb5b9af

File tree

8 files changed

+39
-43
lines changed

8 files changed

+39
-43
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
view

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,11 @@
66

77
# 安装终极版
88
~/.vim/ultimate_install.sh
9+
10+
####注意
11+
- 自动补全
12+
13+
目前使用YCM,编译环境为mac os X,如果需要在其他平台使用,需要手动安装
14+
15+
cd ~/.vim/bundle/YouCompleteMe
16+
./install.py --racer-completer --gocode-completer # 如果需要支持其他语言,查阅README文件

bundle/YouCompleteMe

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 80079ec3c21a55f7b8d55b62dd7b3216fed50634

bundle/gocode

Lines changed: 0 additions & 1 deletion
This file was deleted.

bundle/syntastic

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 4486e2ed372df9bd3fef219fc8358cde577d9972
1+
Subproject commit 9ac3dbe2b907870a0fd8287ee8658c4619e6e97c

bundle/tagbar

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 7b36c46d17d57db34fdb0adac9ba6382d0bb5e66

ultimate.vim

Lines changed: 24 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,13 @@ Plugin 'kchmck/vim-coffee-script'
8686
Plugin 'octol/vim-cpp-enhanced-highlight'
8787
" }}}
8888
" Plugin 'SyntaxAttr.vim'
89-
" Plugin 'Valloric/YouCompleteMe'
89+
" neocomplete {{{
90+
" disabled because dependency of vim with lua
91+
" Plugin 'Shougo/neocomplete.vim'
92+
" }}}
93+
" YouCompleteMe{{{
94+
Plugin 'Valloric/YouCompleteMe'
95+
" }}}
9096
" useless {{{
9197
" Plugin 'tpope/vim-unimpaired.git'
9298
" }}}
@@ -108,26 +114,6 @@ set t_Co=256
108114
colo molokai
109115
let g:molokai_original = 1
110116
"}}}
111-
"Shougo/neocomplcache{{{
112-
" Plugin 'Shougo/neocomplete.vim'
113-
" set completeopt-=preview
114-
" let g:neocomplcache_enable_at_startup = 1
115-
" let g:neocomplcache_enable_smart_case = 1
116-
" let g:neocomplcache_enable_camel_case_completion = 1
117-
" let g:neocomplcache_enable_underbar_completion = 1
118-
" let g:neocomplcache_caching_limit_file_size = 50000000
119-
" let g:neocomplcache_min_syntax_length = 2
120-
" "<CR>: close popup and save indent.
121-
" inoremap <expr><CR> neocomplcache#smart_close_popup() . "\<CR>"
122-
" "<TAB>: completion. NO USE with snipmate
123-
" inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
124-
" "<C-h>, <BS>: close popup and delete backword char.
125-
" inoremap <expr><C-h> neocomplcache#smart_close_popup()."\<C-h>"
126-
" inoremap <expr><BS> neocomplcache#smart_close_popup()."\<C-h>"
127-
" inoremap <expr><C-Y> neocomplcache#close_popup()
128-
" inoremap <expr><C-e> neocomplcache#cancel_popup()
129-
"let g:neocomplcache_enable_auto_select = 1
130-
"}}}
131117
"scrooloose/nerdtree{{{
132118
Plugin 'scrooloose/nerdtree'
133119
let g:NERDChristmasTree = 1
@@ -139,11 +125,18 @@ noremap <F2> :NERDTreeToggle<cr>
139125
"}}}
140126
"scrooloose/syntastic{{{
141127
Plugin 'scrooloose/syntastic'
128+
set statusline+=%#warningmsg#
129+
set statusline+=%{SyntasticStatuslineFlag()}
130+
set statusline+=%*
131+
142132
let g:syntastic_always_populate_loc_list = 1
133+
let g:syntastic_auto_loc_list = 1
134+
let g:syntastic_check_on_open = 1
135+
let g:syntastic_check_on_wq = 0
143136
"let g:syntastic_aggregate_errors = 1
144137
let g:syntastic_mode_map = { 'mode': 'active',
145138
\ 'active_filetypes': [],
146-
\ 'passive_filetypes': ['python'] }
139+
\ 'passive_filetypes': ['python', 'go'] }
147140
"}}}
148141
"mattn/emmet-vim{{{
149142
" not working
@@ -175,14 +168,17 @@ let g:pymode_run_bind = '<leader>r'
175168
"}}}
176169
"fatih/vim-go"{{{
177170
Plugin 'fatih/vim-go'
178-
" let g:go_fmt_command = "goimports"
171+
let g:go_fmt_command = "goimports"
179172
let g:go_fmt_autosave = 0
180173
let g:go_fmt_fail_silently = 0
181174
let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck']
182-
let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] }
183-
let g:go_list_type = "quickfix"
175+
" let g:go_list_type = "quickfix"
184176
"}}}
185-
Plugin 'nsf/gocode', {'rtp': 'vim/'}
177+
" tag bar {{{
178+
Plugin 'majutsushi/tagbar'
179+
nmap <F8> :TagbarToggle<CR>
180+
" }}}
181+
" Plugin 'nsf/gocode', {'rtp': 'vim/'}
186182
"}}}
187183
" End Vundle {{{
188184
filetype plugin indent on " required!
@@ -200,17 +196,6 @@ endif
200196
" Custom Maps {{{
201197
noremap <leader>q <C-W>c
202198
noremap <leader>w :w!<cr>
203-
noremap <F4> <C-W>_
204-
inoremap <F4> <C-W>_
205-
noremap <F5> :make!<cr>
206-
noremap <leader>s :sh<cr>
207-
noremap \| :ls<cr>
208-
" Fast editing of the .vimrc
209-
if s:OS == 'windows'
210-
map <leader>e :e! $VIM/_vimrc<cr>
211-
else
212-
map <leader>e :e! ~/.vimrc<cr>
213-
endif
214199
vnoremap <silent> * :call VisualSearch('f')<CR>
215200
vnoremap <silent> # :call VisualSearch('b')<CR>
216201
vnoremap <silent> gv :call VisualSearch('gv')<CR>
@@ -526,11 +511,12 @@ au FileType go nmap <leader>b <Plug>(go-build)
526511
au FileType go nmap <Leader>s <Plug>(go-implements)
527512
au FileType go nmap <leader>] <Plug>(go-def-vertical)
528513
au FileType go nmap <F12> :GoFmt <CR>
514+
au FileType go nmap <F10> :GoMetaLinter <CR>
529515
530516
set foldmethod=syntax "fold based on indent
531517
set foldnestmax=10 "deepest fold is 10 levels
532518
set nofoldenable "dont fold by default
533-
set foldlevel=1 "this is just what i use
519+
set foldlevel=3 "this is just what i use
534520
autocmd BufWinLeave *.* mkview
535521
autocmd BufWinEnter *.* silent loadview
536522

ultimate_install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
cd $(dirname "$0")
33
ln -fs $(pwd)/ultimate.vim ~/.vimrc
44

5-
if [ ! -d ~/.vim_runtime/bundle/vundle ]; then
6-
rm -rf ~/.vim_runtime/bundle/*
7-
git clone git://github.com/gmarik/vundle.git ~/.vim_runtime/bundle/vundle
5+
if [ ! -d ~/.vim/bundle/vundle ]; then
6+
rm -rf ~/.vim/bundle/*
7+
git clone git://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
88
fi
99

1010
vim +BundleInstall! +qa

0 commit comments

Comments
 (0)