Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
153 lines (115 sloc) 3.77 KB
"
" .vimrc
"
" ensure we get access to all of the vim features
set nocompatible
"""""""""""""""""""""""""""""""""
" Set up Vundle
"""""""""""""""""""""""""""""""""
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
" opening files
Plugin 'scrooloose/nerdtree'
Plugin 'jlanzarotta/bufexplorer'
" Themes
Plugin 'altercation/vim-colors-solarized'
" Real-time syntax checking
Plugin 'scrooloose/syntastic'
" Highlight tag/pair when editing html
Plugin 'Valloric/MatchTagAlways'
" git support
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-fugitive'
Plugin 'Xuyuanp/nerdtree-git-plugin'
Plugin 'mattn/emmet-vim'
" scala support
Plugin 'derekwyatt/vim-scala'
Plugin 'cakebaker/scss-syntax.vim'
" fuzzy file finding
Plugin 'kien/ctrlp.vim'
" support for common formatting
Plugin 'editorconfig/editorconfig-vim'
" support for prose editing
Plugin 'reedes/vim-pencil'
" easily moving through file
Plugin 'easymotion/vim-easymotion'
" configurable status line
"Plugin 'bling/vim-airline'
Plugin 'powerline/powerline', { 'rtp': 'powerline/bindings/vim' }
call vundle#end()
"""""""""""""""""""""""""""""""""
" Other configuration
"""""""""""""""""""""""""""""""""
" convenient for use when working with plaintext
set autoindent
" activate loading plugin / indenting based on file load
filetype plugin indent on
set shiftwidth=2
set softtabstop=2
" expand tabs to spaces
set expandtab
" show line numbers
set number
" quit file editing
map Q :q!<CR>
" Emmet setting
let g:user_zen_settings = {
\ 'indentation' : 2,
\}
" leader commands
let mapleader=" "
map <leader>k :CtrlP<cr>
map <leader>rr :source ~/.vimrc<CR>
map <leader>ee :e ~/.vimrc<CR>
" set F2 to toggle paste mode
set pastetoggle=<F2>
set ttyfast
set mouse=a
set ttymouse=xterm2
set hidden " let hidden buffers open
set history=700
" use solarized theme
set background=dark
colorscheme solarized
let g:solarized_termtrans=1
" airline configuration
"let g:airline#extensions#tabline#enabled=1
" always show status line
set laststatus=2
" NERDTree configuration
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
map <leader><leader> :NERDTreeToggler<CR>
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
function! NERDTreeHighlightFile(extension, fg, bg, guifg, guibg)
exec 'autocmd filetype nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' ctermfg='. a:fg .' guibg='. a:guibg .' guifg='. a:guifg
exec 'autocmd filetype nerdtree syn match ' . a:extension .' #^\s\+.*'. a:extension .'$#'
endfunction
call NERDTreeHighlightFile('jade', 'green', 'none', 'green', '#151515')
call NERDTreeHighlightFile('ini', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('md', 'blue', 'none', '#3366FF', '#151515')
call NERDTreeHighlightFile('yml', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('config', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('conf', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('json', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('html', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('styl', 'cyan', 'none', 'cyan', '#151515')
call NERDTreeHighlightFile('css', 'cyan', 'none', 'cyan', '#151515')
call NERDTreeHighlightFile('coffee', 'Red', 'none', 'red', '#151515')
call NERDTreeHighlightFile('js', 'Red', 'none', '#ffa500', '#151515')
call NERDTreeHighlightFile('php', 'Magenta', 'none', '#ff00ff', '#151515')
" - MatchTagAlways
let g:mta_filetypes = {
\ 'html' : 1,
\ 'xml' : 1,
\ 'php' : 1
\}
map <leader>< vatoz<CR><ESC><ESC>
map <leader>> vatz<CR><ESC><ESC>
" - Fugitive
map <leader>b :Gblame<CR>
" changing buffer
map <Left> :bp<CR>
map <right> :bn<CR>