diff --git a/my_configs.vim b/my_configs.vim index 02566466..650f9320 100644 --- a/my_configs.vim +++ b/my_configs.vim @@ -1,5 +1,9 @@ set number +"格式化python代码 +au FileType python set formatprg=~/pyformat.py +noremap gggqG + "-- Taglist setting -- let Tlist_Ctags_Cmd='ctags' "因为我们放在环境变量里,所以可以直接执行 let Tlist_Use_Right_Window=1 "让窗口显示在右边,0的话就是显示在左边 @@ -14,3 +18,9 @@ let Tlist_Inc_Winwidth=0 let g:winManagerWindowLayout='FileExplorer|TagList' " 设置我们要管理的插件 let g:persistentBehaviour=0 " 如果所有编辑文件都关闭了,退出vim nmap wm :WMToggle + +"-- YCM -- +let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py' +nnoremap jd :YcmCompleter GoToDefinitionElseDeclaration +let g:ycm_server_keep_logfiles = 1 +let g:ycm_server_log_level = 'debug' diff --git a/vundle_plugins.vim b/vundle_plugins.vim index 5ca9324e..db386aaa 100644 --- a/vundle_plugins.vim +++ b/vundle_plugins.vim @@ -8,7 +8,6 @@ Bundle 'mru.vim' Bundle 'taglist.vim' Bundle 'winmanager' - """ original repos on github Bundle 'scrooloose/nerdtree' Bundle 'mileszs/ack.vim' @@ -29,3 +28,4 @@ Bundle 'MarcWeber/vim-addon-mw-utils' Bundle 'tomtom/tlib_vim' Bundle 'garbas/vim-snipmate' Bundle 'honza/vim-snippets' +Bundle 'Valloric/YouCompleteMe'