-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.vimrc
122 lines (92 loc) · 2.73 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
set nocompatible " [required]
filetype off " [required]
" 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 start here
"============================================================
Plugin 'chriskempson/base16-vim'
Plugin 'altercation/vim-colors-solarized.git'
Plugin 'scrooloose/nerdtree'
Plugin 'bling/vim-airline'
Plugin 'scrooloose/syntastic'
Plugin 'tpope/vim-fugitive'
Plugin 'airblade/vim-gitgutter'
Plugin 'mustache/vim-mustache-handlebars'
Plugin 'editorconfig/editorconfig-vim'
Plugin 'mileszs/ack.vim'
Plugin 'rking/ag.vim'
"============================================================
" Plugins end here
"============================================================
" All of your Plugins must be added before the following line
call vundle#end() " [required]
syntax on
filetype plugin indent on
" Make backspace work like most other apps
set backspace=2
" Show line numbers
set number
" Show invisible characters
set list
set listchars=tab:>-,trail:.,extends:>,precedes:<
" Highlight search results
set hlsearch
" Solarized color scheme
syntax enable
set background=dark
:if !empty(glob("$HOME/.vim/bundle/vim-colors-solarized"))
colorscheme base16-default
endif
" Vertical split appears to the right
set splitright
" Horizontal split appears below
set splitbelow
" Use 2 spaces for a tab
set tabstop=2 shiftwidth=2 expandtab
" Show hidden files in NERDTree
let NERDTreeShowHidden=1
" Always show airline (statusline)
set laststatus=2
" Airline theme
let g:airline_theme='solarized'
" Automatically populate powerline symbol
let g:airline_powerline_fonts=1
" Enable mouse in all modes
set mouse=a
" JSHint
let g:syntastic_javascript_checkers = ['jshint']
" Use Ag for search
let g:agprg="ag --column"
" Enable file type detection
filetype on
" Treat .json files as .js
autocmd BufNewFile,BufRead *.json setfiletype json syntax=javascript
" Treat .md files as Markdown
autocmd BufNewFile,BufRead *.md setlocal filetype=markdown
" Set backup, swap and undo directories
set swapfile
set backupdir=~/.vim/backups
set directory=~/.vim/swaps
if exists("&undodir")
set undodir=~/.vim/undo
endif
" Auto-open NERDTree when VIM starts without an argument
function! StartUp()
if 0 == argc()
NERDTree " Open NERDTree
wincmd w " Switch to the empty split
wincmd q " Close the empty split
end
endfunction
autocmd VimEnter * call StartUp()
" ============
" Key Bindings
" ============
" File tree browser
map \ :NERDTreeToggle<CR>
" File tree browser showing current file - pipe (shift-backslash)
map \| :NERDTreeFind<CR>