2015-04-17 00:28:57 +00:00
|
|
|
""""""""Setup env""""""""
|
|
|
|
set t_Co=256
|
|
|
|
syntax enable
|
|
|
|
set background=dark
|
|
|
|
colorscheme Tomorrow-Night-Eighties
|
|
|
|
set nu
|
|
|
|
set laststatus=2
|
2015-04-23 05:06:09 +00:00
|
|
|
set hlsearch ignorecase
|
2015-04-17 00:28:57 +00:00
|
|
|
"Auto indent
|
2015-05-28 09:24:14 +00:00
|
|
|
filetype on
|
|
|
|
filetype plugin on
|
2015-04-17 00:28:57 +00:00
|
|
|
filetype indent on
|
2015-04-17 23:21:44 +00:00
|
|
|
set autoindent
|
2015-05-16 20:09:03 +00:00
|
|
|
set smartindent
|
2015-04-17 00:28:57 +00:00
|
|
|
"Tab
|
|
|
|
set tabstop=2 shiftwidth=0 expandtab
|
|
|
|
set pastetoggle=<F2>
|
2015-06-01 00:19:42 +00:00
|
|
|
let mapleader = ','
|
2015-04-17 00:28:57 +00:00
|
|
|
"Line wrapping
|
|
|
|
set wrap
|
|
|
|
set linebreak
|
|
|
|
set nolist
|
|
|
|
|
2015-06-01 00:19:42 +00:00
|
|
|
set nocompatible
|
|
|
|
filetype off
|
2015-04-17 00:28:57 +00:00
|
|
|
|
|
|
|
""""""""Setup Vundle""""""""
|
|
|
|
" 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'
|
|
|
|
|
|
|
|
""""""""Plugins""""""""
|
|
|
|
Plugin 'tpope/vim-fugitive'
|
|
|
|
Plugin 'airblade/vim-gitgutter'
|
|
|
|
Plugin 'scrooloose/nerdtree'
|
|
|
|
Plugin 'bling/vim-airline'
|
|
|
|
Plugin 'Townk/vim-autoclose'
|
2015-04-17 07:38:59 +00:00
|
|
|
Plugin 'plasticboy/vim-markdown'
|
2015-05-16 20:09:03 +00:00
|
|
|
Plugin 'kchmck/vim-coffee-script'
|
|
|
|
Plugin 'pangloss/vim-javascript'
|
2015-05-28 09:24:14 +00:00
|
|
|
Plugin 'jelera/vim-javascript-syntax'
|
|
|
|
Plugin 'octol/vim-cpp-enhanced-highlight'
|
2015-05-30 17:54:17 +00:00
|
|
|
Plugin 'tpope/vim-haml'
|
|
|
|
Plugin 'hail2u/vim-css3-syntax'
|
2015-05-16 20:09:03 +00:00
|
|
|
Bundle 'kien/ctrlp.vim'
|
2015-04-17 00:28:57 +00:00
|
|
|
Bundle 'mattn/webapi-vim'
|
|
|
|
Bundle 'mattn/gist-vim'
|
|
|
|
Bundle 'vim-ruby/vim-ruby'
|
|
|
|
Bundle 'scrooloose/nerdcommenter'
|
|
|
|
Bundle 'tpope/vim-surround'
|
|
|
|
Bundle 'ervandew/supertab'
|
|
|
|
|
|
|
|
call vundle#end() " required
|
|
|
|
filetype plugin indent on " required
|
|
|
|
|
|
|
|
""""""""Setup Airline""""""""
|
|
|
|
let g:airline_theme= 'bubblegum'
|
2015-05-16 20:09:03 +00:00
|
|
|
let g:airline_powerline_fonts = 1
|
2015-04-17 00:28:57 +00:00
|
|
|
|
|
|
|
""""""""Setup GitGutter""""""""
|
|
|
|
let g:gitgutter_enabled = 1
|
|
|
|
let g:gitgutter_signs = 1
|
|
|
|
let g:gitgutter_highlight_lines = 0
|
|
|
|
|
|
|
|
""""""""Setup AutoClose""""""""
|
2015-04-18 18:45:23 +00:00
|
|
|
let g:AutoClosePairs = "() {} \" ` ' [] <>"
|
2015-04-17 00:28:57 +00:00
|
|
|
|
|
|
|
""""""""Leader Commands""""""""
|
2015-05-28 09:24:14 +00:00
|
|
|
nnoremap <leader>n :NERDTreeToggle<CR>
|
2015-04-17 23:21:44 +00:00
|
|
|
nnoremap <leader>w :w <CR>
|
2015-04-17 00:28:57 +00:00
|
|
|
nnoremap <leader>i :PluginInstall<CR>
|
|
|
|
nnoremap <leader>g :Gist<CR>
|
2015-04-17 23:21:44 +00:00
|
|
|
nnoremap <leader>q :q<CR>
|
|
|
|
nnoremap <leader>x :x<CR>
|
2015-04-17 00:28:57 +00:00
|
|
|
nnoremap <leader>r :%s/
|
2015-05-28 09:24:14 +00:00
|
|
|
nnoremap <leader>v :vsplit<CR>
|
|
|
|
nnoremap <leader>bd :bd<CR>
|
2015-05-28 09:31:44 +00:00
|
|
|
nnoremap <leader>bn :bnext!<CR>
|
|
|
|
nnoremap <leader>bp :bprevious!<CR>
|
2015-06-01 00:19:42 +00:00
|
|
|
nnoremap <leader>t :!
|
2015-05-28 09:24:14 +00:00
|
|
|
|
2015-06-09 07:30:04 +00:00
|
|
|
|
2015-04-18 18:45:23 +00:00
|
|
|
""""""Setup ctlp""""""
|
2015-04-26 00:00:56 +00:00
|
|
|
set runtimepath^=~/.vim/bundle/ctrlp.vim
|
2015-04-17 00:28:57 +00:00
|
|
|
let g:ctrlp_map = '<leader>p'
|
|
|
|
let g:ctrlp_cmd = 'CtrlP'
|
2015-04-18 18:45:23 +00:00
|
|
|
|
|
|
|
""""""Remap split movement""""""
|
2015-05-30 17:54:17 +00:00
|
|
|
nmap <leader>j <c-w>j
|
|
|
|
nmap <leader>k <c-w>k
|
|
|
|
nmap <leader>h <c-w>h
|
|
|
|
nmap <leader>l <c-w>l
|
2015-04-18 18:45:23 +00:00
|
|
|
|
|
|
|
""""""Improve indent in visual mode""""""
|
|
|
|
vnoremap < <gv
|
|
|
|
vnoremap > >gv
|
2015-05-28 09:24:14 +00:00
|
|
|
|
|
|
|
""""""Enable Extra Cpp Syntax Highlighting Features""""""
|
|
|
|
let g:cpp_class_scope_highlight = 1
|
|
|
|
let g:cpp_experimental_template_highlight = 1
|
|
|
|
|
|
|
|
""""""Enable Better HTML AutoIndent""""""
|
2015-06-01 00:19:42 +00:00
|
|
|
let g:html_indent_inctags = 'html,body,head,tbody, div, img, a'
|
|
|
|
|
|
|
|
""""""Enable vim-airline's tabline""""""
|
|
|
|
let g:airline#extensions#tabline#enabled = 1
|