Last active
August 29, 2015 14:04
-
-
Save winsonwq/a77f8f27e66a378a2a0b to your computer and use it in GitHub Desktop.
this is my vimrc
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
" don't bother with vi compatibility | |
set nocompatible | |
" vundle start | |
filetype off " required | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'wavded/vim-stylus' | |
Plugin 'brettof86/vim-swigjs.git' | |
Plugin 'tpope/vim-surround' | |
Plugin 'junegunn/seoul256.vim' | |
Plugin 'mattn/emmet-vim' | |
Plugin 'Valloric/YouCompleteMe' | |
Plugin 'marijnh/tern_for_vim' | |
Plugin 'scrooloose/syntastic' | |
Plugin 'Chiel92/vim-autoformat' | |
Plugin 'mileszs/ack.vim' | |
" Plugin 'nathanaelkane/vim-indent-guides' | |
" Plugin 'ervandew/supertab' | |
Plugin 'honza/vim-snippets' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'SirVer/ultisnips' | |
" Plugin 'flazz/vim-colorschemes' | |
Plugin 'mattn/webapi-vim' | |
Plugin 'mattn/gist-vim' | |
Plugin 'elzr/vim-json' | |
Plugin 'jelera/vim-javascript-syntax' | |
Plugin '907th/vim-auto-save' | |
" Plugin 'townk/vim-autoclose' | |
Plugin 'jlanzarotta/bufexplorer' | |
Plugin 'kien/ctrlp.vim' | |
Plugin 'shougo/neocomplcache.vim' | |
Plugin 'jistr/vim-nerdtree-tabs' | |
Plugin 'wycats/nerdtree' | |
Plugin 'tomtom/tcomment_vim' | |
Plugin 'MarcWeber/vim-addon-mw-utils' | |
Plugin 'bling/vim-airline' | |
Plugin 'kchmck/vim-coffee-script' | |
Plugin 'junegunn/vim-easy-align' | |
Plugin 'Lokaltog/vim-easymotion' | |
Plugin 'tpope/Vim-fugitive' | |
Plugin 'hrsh7th/vim-hybrid' | |
Plugin 'statianzo/vim-jade' | |
Plugin 'tpope/vim-markdown' | |
Plugin 'terryma/vim-multiple-cursors' | |
Plugin 'blerins/flattown' | |
Plugin 'altercation/vim-colors-solarized' | |
call vundle#end() | |
" enable syntax highlighting | |
syntax on | |
" ensure ftdetect et al work by including this after the Vundle stuff | |
filetype plugin indent on | |
set autoindent | |
set autoread " reload files when changed on disk, i.e. via `git checkout` | |
set backspace=2 " Fix broken backspace in some setups | |
set backupcopy=yes " see :help crontab | |
set clipboard=unnamed " yank and paste with the system clipboard | |
set background=dark | |
set directory-=. " don't store swapfiles in the current directory | |
set encoding=utf-8 | |
set expandtab " expand tabs to spaces | |
set ignorecase " case-insensitive search | |
set incsearch " search as you type | |
set laststatus=2 " always show statusline | |
set list " show trailing whitespace | |
set listchars=tab:‚ñ∏\ ,trail:‚ñ´ | |
set number " show line numbers | |
set ruler " show where you are | |
set scrolloff=3 " show context above/below cursorline | |
set shiftwidth=2 " normal mode indentation commands use 2 spaces | |
set showcmd | |
set smartcase " case-sensitive search if any caps | |
set softtabstop=2 " insert mode tab and backspace use 2 spaces | |
set tabstop=8 " actual tabs occupy 8 characters | |
set wildignore=log/**,node_modules/**,target/**,tmp/**,*.rbc | |
set wildmenu " show a navigable menu for tab completion | |
set wildmode=longest,list,full | |
set guifont=Monaco:h14 | |
set relativenumber | |
set number | |
set undofile | |
set undodir=/Users/qiuwang/.vimundo/ | |
set tabstop=2 softtabstop=1 expandtab shiftwidth=2 smarttab | |
let g:solarized_termcolors=256 | |
colorscheme solarized | |
" keyboard shortcut | |
let mapleader = ' ' | |
let &t_Co=256 | |
" let g:neocomplcache_enable_at_startup = 1 | |
let g:auto_save = 1 | |
" let g:neocomplcache_enable_camel_case_completion = 1 | |
" let g:neocomplcache_enable_underbar_completion = 1 | |
" let g:neocomplcache_enable_auto_select = 0 | |
let g:user_emmet_leader_key='<C-Y>' | |
let g:ycm_filetype_blacklist = { | |
\ 'tagbar' : 1, | |
\ 'qf' : 1, | |
\ 'notes' : 1, | |
\ 'markdown' : 1, | |
\ 'unite' : 1, | |
\ 'text' : 1, | |
\ 'vimwiki' : 1, | |
\ 'gitcommit' : 1, | |
\} | |
" Trigger configuration. Do not use <tab> if you use | |
" https://github.com/Valloric/YouCompleteMe. | |
let g:UltiSnipsExpandTrigger="<c-o>" | |
let g:UltiSnipsJumpForwardTrigger="<c-b>" | |
let g:UltiSnipsJumpBackwardTrigger="<c-z>" | |
let g:tern_map_keys=1 | |
let g:tern_show_argument_hints='on_hold' | |
" If you prefer the Omni-Completion tip window to close when a selection is | |
" made, these lines close it on movement in insert mode or when leaving | |
" insert mode | |
autocmd CursorMovedI * if pumvisible() == 0|pclose|endif | |
autocmd InsertLeave * if pumvisible() == 0|pclose|endif | |
" If you want :UltiSnipsEdit to split your window. | |
let g:UltiSnipsEditSplit="vertical" | |
map <c-u> :NERDTree<cr> | |
map <leader>b :Bufstop<cr> | |
" Start interactive EasyAlign in visual mode (e.g. vip<Enter>) | |
vmap <Enter> <Plug>(EasyAlign) | |
" Start interactive EasyAlign for a motion/text object (e.g. <Leader>aip) | |
nmap <Leader>q <Plug>(EasyAlign) | |
nnoremap <Up> <ESC>:bN<CR> | |
nnoremap <Down> <ESC>:bn<CR> | |
nnoremap <leader>f :CtrlPBuffer<CR> | |
nnoremap <leader>r :CtrlPMRU<CR> | |
nnoremap <BS><BS> <c-^> | |
nnoremap H ^ | |
nnoremap L g_ | |
nnoremap ; : | |
nnoremap <C-j> <C-w>j | |
nnoremap <C-k> <C-w>k | |
nnoremap <C-h> <C-w>h | |
nnoremap <C-l> <C-w>l | |
inoremap jj <ESC> | |
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" | |
inoremap <expr><C-Space> pumvisible() ? neocomplcache#close_popup() : "\<C-Space>" | |
vnoremap <leader>yo "*y | |
nnoremap <leader>po "*p | |
imap Àô <Left> | |
imap ∆ <Down> | |
imap Àö <Up> | |
imap ¬ <Right> | |
nmap <F6> :TernRename<CR> | |
nmap <F7> :TernDef<CR> | |
nmap <F8> :TernRefs<CR> | |
nmap <F9> :TernDoc<CR> | |
autocmd BufNewFile,BufReadPost *.md set filetype=markdown | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment