美文网首页
VIM 配置

VIM 配置

作者: xiao_kong | 来源:发表于2019-01-17 22:23 被阅读0次
    inoremap jj <Esc>
    inoremap jk <Esc>
    inoremap kk <Esc>
    set ruler
    set history=1000
    set laststatus=2
    syntax on
    set fileencodings=utf-8,gb2312,gbk,cp936,latin-1
    set fileencoding=utf-8
    set termencoding=utf-8
    set fileformat=unix
    set encoding=utf-8
    set wildmenu
    set nocompatible
    set backspace=indent,eol,start
    set backspace=2
     
    set smartindent
    set tabstop=4
    set nobackup
    set nowritebackup
    set noswapfile
    set expandtab
    set showmatch
    set hlsearch
    set softtabstop=4
    set shiftwidth=4
    set showcmd
    set clipboard=unnamed
    
    let &t_SI = "\<Esc>]50;CursorShape=1\x7"
    let &t_EI = "\<Esc>]50;CursorShape=0\x7"
    set mouse=a
    set selection=exclusive
    set selectmode=mouse,key
    set matchtime=5
    colorscheme molokai
    set ruler
    set t_Co=256
    set background=dark
    " *********************************************
    " Vbundle插件管理
    " *********************************************
    filetype off " required
    set rtp+=~/.vim/bundle/Vundle.vim
    call vundle#begin()
    Plugin 'gmarik/Vundle.vim'
    Plugin 'Valloric/YouCompleteMe' 
    Plugin 'fatih/vim-go'
    Plugin 'scrooloose/nerdtree'
    Plugin 'jistr/vim-nerdtree-tabs'
    Plugin 'tell-k/vim-autopep8'
    Plugin 'jiangmiao/auto-pairs'
    Plugin 'Yggdroot/indentLine'
    Plugin 'kien/ctrlp.vim'
    call vundle#end() " required
    filetype plugin indent on " required
    
    " *********************************************
    " YCM插件相关
    " *********************************************
    let g:ycm_autoclose_preview_window_after_completion=1
    " 跳转到定义处
    map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
    " 默认tab、s-tab和自动补全冲突
    let g:ycm_key_list_select_completion = ['<TAB>', '<c-n>', '<Down>']
    let g:ycm_key_list_previous_completion = ['<S-TAB>', '<c-p>', '<Up>']
    let g:ycm_auto_trigger = 1
    let g:ycm_python_binary_path  = '/Users/wei.qi/anaconda3/bin/python3.6'
    autocmd FileType python noremap <buffer> <Leader>ll :call Autopep8()<CR>
    let NERDTreeIgnore=['\~$', '\.pyc$', '\.swp$']
    map <Leader>nt :NERDTreeToggle<CR>
    map <Leader>ww :w<CR>
    map <Leader>qq :q!<CR>
    map <Leader>ppp :w<cr>:!python %<cr>
    map <Leader>mmm :!make 
    set cursorline
    set nu
    
    

    相关文章

      网友评论

          本文标题:VIM 配置

          本文链接:https://www.haomeiwen.com/subject/fqwwdqtx.html