update
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
@@ -1,5 +1,7 @@
|
||||
" set the runtime path to include Vundle and initialize
|
||||
set rtp+=~/.fzf/
|
||||
set nocompatible
|
||||
filetype off
|
||||
set rtp+=~/.vim/bundle/Vundle.vim
|
||||
call vundle#begin()
|
||||
|
||||
@@ -66,30 +68,28 @@ Plugin 'https://github.com/tpope/vim-fugitive.git'
|
||||
Plugin 'airblade/vim-gitgutter'
|
||||
set updatetime=100
|
||||
|
||||
Plugin 'https://github.com/plytophogy/vim-virtualenv.git'
|
||||
let g:virtualenv_directory = '~/.virtualenv'
|
||||
"Plugin 'https://github.com/plytophogy/vim-virtualenv.git'
|
||||
"let g:virtualenv_directory = '~/.virtualenv'
|
||||
|
||||
Plugin 'godlygeek/tabular'
|
||||
Plugin 'plasticboy/vim-markdown'
|
||||
Plugin 'suan/vim-instant-markdown'
|
||||
"Plugin 'suan/vim-instant-markdown'
|
||||
|
||||
Plugin 'Valloric/YouCompleteMe'
|
||||
|
||||
set runtimepath+=~/.vim/bundle/YouCompleteMe
|
||||
autocmd InsertLeave * if pumvisible() == 0|pclose|endif "离开插入模式后自动关闭预览窗口"
|
||||
let g:ycm_collect_identifiers_from_tags_files = 1 " 开启 YCM基于标签引擎
|
||||
let g:ycm_collect_identifiers_from_comments_and_strings = 1 " 注释与字符串中的内容也用于补全
|
||||
"let g:syntastic_ignore_files=[".*\.py$"]
|
||||
let g:ycm_seed_identifiers_with_syntax = 1 " 语法关键字补全
|
||||
let g:ycm_complete_in_comments = 1
|
||||
let g:ycm_confirm_extra_conf = 0 " 关闭加载.ycm_extra_conf.py提示
|
||||
let g:ycm_key_list_select_completion = ['<c-n>', '<Down>'] " 映射按键,没有这个会拦截掉tab, 导致其他插件的tab不能用.
|
||||
let g:ycm_key_list_previous_completion = ['<c-p>', '<Up>']
|
||||
let g:ycm_complete_in_comments = 1 " 在注释输入中也能补全
|
||||
let g:ycm_complete_in_strings = 1 " 在字符串输入中也能补全
|
||||
let g:ycm_collect_identifiers_from_comments_and_strings = 1 " 注释和字符串中的文字也会被收入补全
|
||||
"let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/third_party/ycmd/.ycm_extra_conf.py'
|
||||
let g:ycm_global_ycm_extra_conf='~/.vim/.ycm_extra_conf.py'
|
||||
let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/third_party/ycmd/.ycm_extra_conf.py'
|
||||
"let g:ycm_global_ycm_extra_conf='~/.vim/.ycm_extra_conf.py'
|
||||
let g:ycm_show_diagnostics_ui = 0 " 禁用语法检查
|
||||
"inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<CR>" " 回车即选中当前项
|
||||
nnoremap <c-d> :YcmCompleter GoToDefinitionElseDeclaration<CR> " 跳转到定义处
|
||||
@@ -109,6 +109,12 @@ let g:closetag_filenames = '*.html,*.xhtml,*.phtml,*.launch'
|
||||
Plugin 'jiangmiao/auto-pairs'
|
||||
|
||||
|
||||
Plugin 'Chiel92/vim-autoformat'
|
||||
noremap <F6> :Autoformat<CR>:w<CR>
|
||||
let g:autoformat_verbosemode=1
|
||||
|
||||
|
||||
|
||||
Plugin 'vim-airline/vim-airline'
|
||||
Plugin 'vim-airline-themes'
|
||||
let g:airline_theme='bubblegum'
|
||||
@@ -221,7 +227,7 @@ func! CompileRunGcc()
|
||||
exec '!g++ % -o %<'
|
||||
exec '!time ./%<'
|
||||
elseif &filetype == 'cpp'
|
||||
exec '!g++ % -o %<'
|
||||
exec '!g++ % -o %< -lboost_system'
|
||||
exec '!time ./%<'
|
||||
elseif &filetype == 'python'
|
||||
exec '!time python %'
|
||||
@@ -345,7 +351,7 @@ set scrolloff=3
|
||||
" 为C程序提供自动缩进
|
||||
set smartindent
|
||||
" 高亮显示普通txt文件(需要txt.vim脚本)
|
||||
au BufRead,BufNewFile * setfiletype txt
|
||||
au BufRead,BufNewFile * setfiletype txt
|
||||
filetype plugin indent on
|
||||
"打开文件类型检测, 加了这句才可以用智能补全
|
||||
set completeopt=longest,menu
|
||||
|
||||