" set autoindent set backspace=indent,eol,start set cursorline set encoding=utf8 set expandtab set fileencoding=utf8 set fileencodings=ucs-bom,utf8,cp950,gbk,latin1 set guifont=Inconsolata:h12 set hlsearch set ignorecase set incsearch set laststatus=2 set lazyredraw set list set listchars=tab:▷\ ,trail:· set mouse= set nobomb set nocompatible set nofoldenable set ruler set scrolloff=3 set secure set shiftwidth=4 set showmatch set smartcase set t_Co=256 set visualbell set wrap set wildmenu if !has('nvim') set re=1 endif " let g:DisableAutoPHPFolding = 1 let g:EditorConfig_exclude_patterns = ['fugitive://.*', 'scp://.*'] let g:indent_guides_auto_colors = 0 let g:indent_guides_enable_on_vim_startup = 1 autocmd VimEnter,Colorscheme * :hi IndentGuidesEven ctermbg=8 autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd ctermbg=236 " " mapping cnoremap pumvisible() ? "\" : "\" cnoremap pumvisible() ? "\" : "\" map :call plug#load('copilot.vim'):Copilot enable nmap [Z W nmap :TagbarToggle nmap w nnoremap p p`] vmap (expand_region_shrink) vmap v (expand_region_expand) vnoremap p p`] vnoremap y y`] " filetype off let g:lightline = {'component':{'lineinfo':'%3l:%-2v'}} let g:polyglot_disabled = ["autoindent", "sensible"] let g:snipMate = {'snippet_version': 1} " call plug#begin('~/.vim/plugged') Plug 'DataWraith/auto_mkdir' Plug 'MarcWeber/vim-addon-mw-utils' Plug 'bonsaiben/bootstrap-snippets' Plug 'ctrlpvim/ctrlp.vim' Plug 'editorconfig/editorconfig-vim' Plug 'garbas/vim-snipmate' Plug 'github/copilot.vim', { 'on': [] } Plug 'godlygeek/csapprox' Plug 'honza/vim-snippets' Plug 'itchyny/lightline.vim' Plug 'luochen1990/rainbow' Plug 'majutsushi/tagbar' Plug 'motus/pig.vim' Plug 'preservim/vim-indent-guides' Plug 'scrooloose/nerdtree' Plug 'sheerun/vim-polyglot' Plug 'terryma/vim-expand-region' Plug 'tomasr/molokai' Plug 'tomtom/tlib_vim' Plug 'tpope/vim-fugitive' Plug 'tpope/vim-surround' Plug 'wuelnerdotexe/vim-astro' call plug#end() " " color schema set background=dark colo molokai highlight Search cterm=none ctermbg=blue " " syntax syntax on autocmd BufEnter * syntax sync fromstart " filetype plugin indent on let g:ctrlp_use_caching = 0 let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . -co --exclude-standard', 'find %s -type f'] let g:rainbow_active = 1 let g:SuperTabDefaultCompletionType = "context" let g:vim_json_syntax_conceal = 0 let mapleader="\" " " other au BufNewFile,BufRead *.mk set noexpandtab au BufNewFile,BufRead *.psgi set filetype=perl au BufNewFile,BufRead *.sls set filetype=yaml au BufNewFile,BufRead *.vue set filetype=html au BufNewFile,BufRead GNUmakefile set noexpandtab au BufNewFile,BufRead Makefile set noexpandtab au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif au FileType css,dart,html,javascript,javascriptreact,json,ruby,typescript,typescriptreact,yaml set shiftwidth=2 au FileType go set noexpandtab shiftwidth=4 tabstop=4 autocmd BufEnter * silent! lcd %:p:h autocmd BufReadPost COMMIT_EDITMSG exe "normal! gg" map :NERDTreeToggle " " Local if filereadable("~/.vim/vimrc.local") source ~/.vim/vimrc.local endif