Created
April 24, 2018 03:34
-
-
Save jzztf/d36331d8c075d77ff2c8e4e631c903b9 to your computer and use it in GitHub Desktop.
vim config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" let Vundle manage Vundle, required | |
Plugin 'gmarik/Vundle.vim' | |
" fold code;autoindent for python | |
Plugin 'tmhedberg/SimpylFold' | |
Plugin 'vim-scripts/indentpython.vim' | |
" highlight code | |
Plugin 'scrooloose/syntastic' | |
" flake8 check | |
Plugin 'nvie/vim-flake8' | |
let python_highlight_all=1 | |
syntax on | |
" set tree view | |
Plugin 'scrooloose/nerdtree' | |
map <C-n> :NERDTreeToggle<CR> | |
let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree | |
" super search<c-p> | |
Plugin 'kien/ctrlp.vim' | |
" airline | |
Plugin 'vim-airline/vim-airline' | |
Plugin 'vim-airline/vim-airline-themes' | |
let g:airline#extensions#tabline#enabled = 1 | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" Split Layouts,<:sv filename>;<:vs filename> | |
set splitbelow | |
set splitright | |
"split navigations | |
nnoremap <C-J> <C-W><C-J> | |
nnoremap <C-K> <C-W><C-K> | |
nnoremap <C-L> <C-W><C-L> | |
nnoremap <C-H> <C-W><C-H> | |
" Enable folding,<za>;<space> | |
set foldmethod=indent | |
set foldlevel=99 | |
" autoindent | |
au BufNewFile,BufRead *.py | |
\ set tabstop=4 | | |
\ set softtabstop=4 | | |
\ set shiftwidth=4 | | |
\ set textwidth=79 | | |
\ set expandtab | | |
\ set autoindent | | |
\ set fileformat=unix | |
au BufNewFile,BufRead *.js, *.html, *.css | |
\ set tabstop=2 | | |
\ set softtabstop=2 | | |
\ set shiftwidth=2 | |
" show blank | |
highlight BadWhitespace ctermbg=red guibg=darkred | |
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ | |
" set coding | |
set encoding=utf-8 | |
" auto complete | |
Bundle 'Valloric/YouCompleteMe' | |
let g:ycm_autoclose_preview_window_after_completion=1 | |
map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR> | |
let g:ycm_python_binary_path = '/usr/bin/python3' | |
" set number | |
set nu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment