-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
116 lines (99 loc) · 2.6 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
let mapleader = ","
set nocompatible
filetype off
" Vundle {
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" Vundle manages Vundle
Bundle 'gmarik/vundle'
" Github sources
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
Bundle 'tpope/vim-fugitive'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'vim-scripts/AutoClose'
Bundle 'ervandew/supertab'
Bundle 'xenoterracide/html.vim'
Bundle 'edsono/vim-matchit'
Bundle 'jpo/vim-railscasts-theme'
Bundle 'altercation/vim-colors-solarized'
Bundle 'godlygeek/tabular'
Bundle 'kien/ctrlp.vim'
Bundle 'scrooloose/nerdtree'
Bundle 'scrooloose/syntastic'
Bundle 'tpope/vim-rails'
Bundle 'aaronjensen/vim-sass-status'
Bundle 'tpope/vim-surround'
Bundle 'airblade/vim-gitgutter'
Bundle 'tpope/vim-haml'
Bundle 'tpope/vim-sleuth'
Bundle 'kchmck/vim-coffee-script'
Bundle 'mustache/vim-mustache-handlebars'
Bundle 'derekwyatt/vim-scala'
Bundle 'luochen1990/rainbow'
Bundle 'Blackrush/vim-gocode'
Bundle 'jistr/vim-nerdtree-tabs'
Bundle 'bling/vim-airline'
Bundle 'Valloric/YouCompleteMe'
Bundle 'gabrielelana/vim-markdown'
Bundle 'pangloss/vim-javascript'
Bundle 'FelikZ/ctrlp-py-matcher'
filetype plugin indent on
" }
" Settings files {
for f in split(glob('~/.vim_settings/*.vim'), '\n')
exe 'source' f
endfor
" }
" Settings {
set nu " Line numbers
set showcmd " Show current command
set backspace=indent,eol,start " Backspace at start of line goes to end of previous line
set history=1000 " Remember everything.
set laststatus=2 " Always show status bar at the bottom
set autoindent
set cindent
set incsearch " Search as you type
set expandtab
set tabstop=2
set shiftwidth=2
set nowritebackup
set nobackup
set noswapfile
" Tab completion of :commands
set wildmenu
set wildmode=list:longest
" Open new split panes to right and bottom, which feels more natural
set splitbelow
set splitright
" Ignore case when searching unless searching with a capital letter
set ignorecase
set smartcase
let g:mustache_abbreviations = 1
" }
" Appearance {
set ruler
set title
set wrap
set cursorline
set scrolloff=5 " Always want some context around the cursor line
" }
" Syntax! {
syntax on
au BufRead,BufNewFile,BufWrite {*.json} set ft=javascript
" Markdown files
au BufRead,BufNewFile {*.md} set filetype=markdown
au BufRead,BufNewFile {*.md} setlocal spell
" }
" Tabular mappings {
if exists(":Tabularize")
nmap <Leader>a= :Tabularize /=<CR>
vmap <Leader>a= :Tabularize /=<CR>
nmap <Leader>a: :Tabularize /:\zs<CR>
vmap <Leader>a: :Tabularize /:\zs<CR>
endif
" }
set hlsearch
hi Search guibg=Magenta
hi Comment cterm=bold ctermfg=DarkGray
" Auto-reload after making changes to the .vimrc
au! BufWritePost .vimrc source %