" General Config set nocompatible set number set backspace=indent,eol,start syntax enable set encoding=utf-8 set fileencodings=ucs=bom,utf-8,utf-16,gbk,big5,gb18030,latin1 set showcmd set autoread set mouse=a filetype on filetype indent on filetype plugin on set modeline set textwidth=72 set formatoptions+=mB set formatoptions-=tc set secure set exrc set noerrorbells " Use python3 first if has('python3') elseif has('python') endif " GUI set guioptions-=m set guioptions-=T set guioptions-=r set guioptions+=c set guifont=DejaVu\ Sans\ Mono\ 12 if has('macunix') set guifont=Monaco:h16 endif set nofoldenable set hidden set completeopt=menu,menuone,popup,noinsert,noselect set completepopup=align:menu,border:off,highlight:WildMenu set shortmess+=c set belloff+=ctrlg " diff set diffopt+=followwrap,algorithm:patience " undo if !isdirectory(expand('~/.vim/.undo')) silent! call mkdir(expand('~/.vim/.undo', 'p')) endif set undodir=~/.vim/.undo// set undofile " set Vim-specific sequences for RGB colors let &t_8f = "\[38;2;%lu;%lu;%lum" let &t_8b = "\[48;2;%lu;%lu;%lum" set t_Co=256 if has("termguicolors") set termguicolors endif " Correct background rendering in some terminal let &t_ut='' " Identation set autoindent set tabstop=4 set shiftwidth=4 set expandtab set softtabstop=4 set wrap "set nowrap "set wrapmargin=4 set scrolloff=5 "set sidescrolloff=5 set laststatus=2 set ruler set hlsearch set incsearch set ignorecase set smartcase " Completion set path+=** set wildmenu set wildignorecase set wildmode=list:longest,full set wildignore=*.o,*.obj,*~ set wildignore+=*DS_Store* set wildignore+=*.gem set wildignore+=*.png,*.jpg,*.gif set wildignore+=**/.git/** set wildignore+=**/node_modules/** " change default directory let s:vim_swapfiles_dir = expand('~/.vim/.swp/') if !isdirectory(s:vim_swapfiles_dir) silent! call mkdir(s:vim_swapfiles_dir, 'p') endif set directory=~/.vim/.swp// " tags set tags=./.tags;,.tags " mapping let mapleader=',' " change the key nnoremap cd :cd %:p:h :pwd nnoremap cnoremap highlight Pmenu ctermbg=grey packadd! onedark.vim silent colorscheme onedark packadd matchit if !empty(glob('~/.vim_local')) source ~/.vim_local endif