Skip to content

Instantly share code, notes, and snippets.

@mks-m
Last active August 29, 2015 14:20
Show Gist options
  • Save mks-m/99cf56824170c95430b2 to your computer and use it in GitHub Desktop.
Save mks-m/99cf56824170c95430b2 to your computer and use it in GitHub Desktop.
"
" mv ~/.vim ~/.vim.old; mkdir -p ~/.vim/bundle; pushd ~/.vim/bundle;
" git clone git@github.com:gmarik/Vundle.vim; vim +PluginInstall; popd
"
set nocompatible
" < vundle and plugins >
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'altercation/vim-colors-solarized'
Plugin 'tomasr/molokai'
Plugin 'bling/vim-airline'
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'scrooloose/syntastic'
Plugin 'xolox/vim-misc'
Plugin 'kien/ctrlp.vim'
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-fugitive'
Plugin 'Raimondi/delimitMate'
Plugin 'sheerun/vim-polyglot'
Plugin 'ntpeters/vim-better-whitespace'
Plugin 'rking/ag.vim'
Plugin 'terryma/vim-multiple-cursors'
call vundle#end()
filetype plugin indent on
" < general >
let mapleader=","
set backspace=indent,eol,start
set ruler
set number
set showcmd
set incsearch
set hlsearch
set list
set listchars=tab:▸\ ,eol:¬
set expandtab
set tabstop=2
syntax on
colorscheme molokai
set laststatus=2
" < airline >
let g:airline_detect_paste=1
let g:airline#extensions#tabline#enabled = 1
" < nerdtree >
let g:nerdtree_tabs_open_on_console_startup = 0
nnoremap <Leader>o :NERDTreeToggle<CR>
" < syntastic >
let g:syntastic_error_symbol = '✘'
let g:syntastic_warning_symbol = "▲"
augroup mySyntastic
au!
au FileType tex let b:syntastic_mode = "passive"
augroup END
" < git gutter >
hi clear SignColumn
let g:airline#extensions#hunks#non_zero_only = 1
" < delimitMate >
let delimitMate_expand_cr = 1
augroup mydelimitMate
au!
au FileType markdown let b:delimitMate_nesting_quotes = ["`"]+ au FileType tex let b:delimitMate_quotes = ""
au FileType tex let b:delimitMate_quotes = ""
au FileType tex let b:delimitMate_matchpairs = "(:),[:],{:},`:'"
au FileType python let b:delimitMate_nesting_quotes = ['"', "'"]
augroup END
" < windows >
nnoremap <leader>j :wincmd j<cr>
nnoremap <leader>k :wincmd k<cr>
nnoremap <leader>l :wincmd w<cr>
" < buffers >
nnoremap <leader>n :bn<cr>
nnoremap <leader>b :bp<cr>
" < ctrlp >
if executable('ag')
" Use Ag over Grep
set grepprg=ag\ --nogroup\ --nocolor
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
endif
nnoremap <Leader>p :CtrlPMixed<CR>
nnoremap <leader>. :CtrlPTag<CR>
" < ag >
nnoremap <Leader>/ :Ag<space>
" < cursor shape in insert mode >
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment