Skip to content

Commit fc5a492

Browse files
authored
Update .vimrc
1 parent 27aa353 commit fc5a492

File tree

1 file changed

+40
-7
lines changed

1 file changed

+40
-7
lines changed

.vimrc

+40-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
set nocompatible " be iMproved, required
2-
filetype off " required
3-
2+
filetype off " required set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin()
43
set rtp+=~/.vim/bundle/Vundle.vim
54
call vundle#begin()
6-
75
Plugin 'iamcco/markdown-preview.vim'
86
Plugin 'gmarik/Vundle.vim'
97
Plugin 'fatih/vim-go'
@@ -15,7 +13,15 @@ Plugin 'flazz/vim-colorschemes'
1513
Plugin 'kien/ctrlp.vim'
1614
Plugin 'mileszs/ack.vim'
1715
Plugin 'Raimondi/delimitMate'
18-
16+
Plugin 'ryanss/vim-hackernews'
17+
Plugin 'jistr/vim-nerdtree-tabs'
18+
Plugin 'dracula/vim'
19+
Plugin 'tmhedberg/matchit'
20+
Plugin 'godlygeek/tabular'
21+
Plugin 'rust-lang/rust.vim'
22+
Plugin 'racer-rust/vim-racer'
23+
Plugin 'vim-scripts/OmniCppComplete'
24+
Plugin 'vim-scripts/a.vim'
1925

2026
call vundle#end() " required
2127
filetype plugin indent on " required
@@ -138,13 +144,14 @@ nmap <F8> :TagbarToggle<CR>
138144
if has("gui_running")
139145
set go=aAce " remove toolbar
140146
" set guifont=Hack:h16
141-
set guifont=Hack:h18
147+
set guifont=Hack\ 15
142148
set showtabline=1
143149
set lines=999 columns=999
144150
"set cursorcolumn
145151
set guioptions=e " instead of clearing this, set it to only `e`
146-
let base16colorspace=256
147-
colorscheme jellybeans
152+
"let base16colorspace=256
153+
"colorscheme dracula
154+
colorscheme radicalgoodspeed
148155
else
149156
set nocursorcolumn
150157
set nocursorline
@@ -167,3 +174,29 @@ let g:mkdp_path_to_chrome = "/Applications/Google\\ Chrome.app/Contents/MacOS/Go
167174
vmap <C-x> :!pbcopy<CR>
168175
vmap <C-c> :w !pbcopy<CR><CR>
169176
177+
set hidden
178+
let g:racer_cmd = "/home/dongxu/.cargo/bin/racer"
179+
let $RUST_SRC_PATH="/home/dongxu/rustc-nightly/src"
180+
181+
set tags+=~/.vim/cpp_tags
182+
" build tags of your own project with Ctrl-F12
183+
map <C-F12> :!ctags -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q -I _GLIBCXX_NOEXCEPT .<CR>
184+
185+
"" OmniCppComplete
186+
" $ cp -R /usr/include/c++/$GCC_VERSION ~/.vim/cpp_src
187+
" # it is not necessary to rename headers without an extension
188+
" # replace the "namespace std _GLIBCXX_VISIBILITY(default)" with "namespace std"
189+
" $ find . -type f | xargs sed -i 's/namespace std _GLIBCXX_VISIBILITY(default)/namespace std/'
190+
" $ ctags -f cpp_tags -R --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ -I _GLIBCXX_NOEXCEPT cpp_src
191+
let OmniCpp_NamespaceSearch = 1
192+
let OmniCpp_GlobalScopeSearch = 1
193+
let OmniCpp_ShowAccess = 1
194+
let OmniCpp_ShowPrototypeInAbbr = 1 " show function parameters
195+
let OmniCpp_MayCompleteDot = 1 " autocomplete after .
196+
let OmniCpp_MayCompleteArrow = 1 " autocomplete after ->
197+
let OmniCpp_MayCompleteScope = 1 " autocomplete after ::
198+
" also necessary for fixing LIBSTDC++ releated stuff
199+
let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"]
200+
" automatically open and close the popup menu / preview window
201+
au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
202+
set completeopt=menuone,menu,longest,preview

0 commit comments

Comments
 (0)