Created
September 7, 2016 14:43
-
-
Save zhengxiaowai/6e7896f2923c56fff2806e0e5a2ed4d8 to your computer and use it in GitHub Desktop.
vim configure
This file contains 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 nu | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
set autoindent | |
set nowrap | |
set expandtab | |
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936 | |
set termencoding=utf-8 | |
set encoding=utf-8 | |
set backupcopy=yes | |
let g:jsx_ext_required = 0 | |
"set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" plugin | |
Plugin 'VundleVim/Vundle.vim' | |
Bundle "justinj/vim-react-snippets" | |
Bundle "MarcWeber/vim-addon-mw-utils" | |
Bundle "tomtom/tlib_vim" | |
Bundle "garbas/vim-snipmate" | |
Bundle "honza/vim-snippets" | |
"Bundle 'mxw/vim-jsx' | |
Bundle 'vim-less' | |
Plugin 'elzr/vim-json' | |
Plugin 'nginx.vim' | |
Bundle 'ctrlpvim/ctrlp.vim' | |
Bundle 'nvie/vim-flake8' | |
Bundle 'mattn/emmet-vim' | |
Bundle 'tpope/vim-markdown' | |
Plugin 'fatih/vim-go' | |
call vundle#end() | |
filetype plugin indent on | |
" end bundle | |
if has("autocmd") | |
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | |
\| exe "normal g'\"" | endif | |
endif | |
syntax on | |
set t_Co=256 | |
"set background=dark | |
" map | |
nnoremap <F2> :set invpaste paste?<CR> | |
imap <F2> <C-O>:set invpaste paste?<CR> | |
set pastetoggle=<F2> | |
nmap <F3> :w<CR> | |
" ctrlp | |
"let g:ctrlp_map = '<leader>p' | |
let g:ctrlp_cmd = 'CtrlP' | |
set wildignore+=*/venv/* | |
map <leader>f :CtrlPMRU<CR> | |
let g:ctrlp_custom_ignore = { | |
\ 'dir': '\v[\/]\.(git|hg|svn|rvm)$', | |
\ 'file': '\v\.(exe|so|dll|zip|tar|tar.gz|pyc)$', | |
\ } | |
let g:ctrlp_working_path_mode=0 | |
let g:ctrlp_match_window_bottom=1 | |
let g:ctrlp_max_height=15 | |
let g:ctrlp_match_window_reversed=0 | |
let g:ctrlp_mruf_max=500 | |
let g:ctrlp_follow_symlinks=1 | |
" 模板信息 | |
let g:snips_author='何翔宇' | |
let g:snips_email='hexiangyu@limijiaoyin.com' | |
let g:snips_git='https://git.limijiaoyin.com/limijiaoyin/limijiaoyin' | |
" go | |
let g:go_highlight_functions = 1 | |
let g:go_highlight_methods = 1 | |
let g:go_highlight_structs = 1 | |
let g:go_highlight_interfaces = 1 | |
let g:go_highlight_operators = 1 | |
let g:go_highlight_build_constraints = 1 | |
let g:vim_json_syntax_conceal = 0 | |
noremap <Up> <Nop> | |
noremap <Down> <Nop> | |
noremap <Left> <Nop> | |
noremap <Right> <Nop> | |
autocmd BufNewFile,BufRead *.js setlocal ts=2 | |
autocmd BufNewFile,BufRead *.js setlocal softtabstop=2 | |
autocmd BufNewFile,BufRead *.js setlocal shiftwidth=2 | |
autocmd BufNewFile,BufReadPost *.md set filetype=markdown | |
autocmd BufRead,BufNewFile /etc/nginx/sites-*/* setfiletype conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment