-
Notifications
You must be signed in to change notification settings - Fork 2
/
vimrc
161 lines (134 loc) · 3.41 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
" In General
set nocompatible
set hidden
set visualbell
" Swap locations
set backupdir=~/.vim_backup
set directory=~/.vim_backup
" Hide scrollbars
set guioptions-=r
set guioptions-=R
set guioptions-=l
set guioptions-=L
" Always hide the toolbar
set guioptions-=T
set mouse=a
" Font Stuff
set guifont=Bitstream\ Vera\ Sans\ Mono:h12
set linespace=2
" Always show line numbers
set number
" Always show the status line
set ls=2
" Keep 3 lines when scrolling
set scrolloff=3
" Highlight searches
set hlsearch
set incsearch
set ignorecase
set cursorline
set autoindent
set smartindent
set nowrap
" Wildmenu
set wildmenu
set wildmode=list:longest,full
" Tabs
set tabstop=4
set shiftwidth=2
set softtabstop=2
set expandtab
set nosmarttab
set list listchars=tab:\ \ ,trail:·
filetype plugin indent on " Enable filetype-specific indenting and plugins
filetype plugin on
" Custom Indentation
au FileType objc setlocal shiftwidth=4 softtabstop=4
au FileType objj setlocal shiftwidth=4 softtabstop=4
au FileType html setlocal shiftwidth=4 softtabstop=4
au FileType php setlocal shiftwidth=4 softtabstop=4
" FileTypes
au BufNewFile,BufRead *.mxml set filetype=mxml
au BufNewFile,BufRead *.as set filetype=actionscript
au BufNewFile,BufRead *.j set filetype=objj
au BufNewFile,BufRead *.feature,*.story set filetype=cucumber
if &t_Co > 2 || has("gui_running")
"if has("terminfo")
" set t_Co=16
" set t_AB=[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm
" set t_AF=[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm
"else
" set t_Co=16
" set t_Sf=[3%dm
" set t_Sb=[4%dm
"endif
set t_Co=256
"" Set the color theme
colorscheme molokai
syntax on
" Highlight tabs
syntax match Tab /\t/
hi Tab gui=underline guibg=#AE81FF ctermbg=135
endif
" Set the status line
set statusline=%t\ %M\ %y\ [%l/%L]\ %{fugitive#statusline()}
" Only show 10 files max
let g:CommandTMaxHeight = 10
" Override the <Leader>t commands in the Align plugin
" They are now all available through <Leader>T instead
map <Leader>T| <Plug>AM_t|
map <Leader>T# <Plug>AM_t#
map <Leader>T, <Plug>AM_t,
map <Leader>T: <Plug>AM_t:
map <Leader>T; <Plug>AM_t;
map <Leader>T< <Plug>AM_t<
map <Leader>T= <Plug>AM_t=
map <Leader>Ts, <Plug>AM_ts,
map <Leader>Ts: <Plug>AM_ts:
map <Leader>Ts; <Plug>AM_ts;
map <Leader>Ts< <Plug>AM_ts<
map <Leader>Ts= <Plug>AM_ts=
map <Leader>w= <Plug>AM_w=
map <Leader>T? <Plug>AM_t?
map <Leader>T~ <Plug>AM_t~
map <Leader>T@ <Plug>AM_t@
map <Leader>m= <Plug>AM_m=
map <Leader>tab <Plug>AM_tab
map <Leader>Tml <Plug>AM_tml
map <Leader>Tsp <Plug>AM_tsp
map <Leader>Tsq <Plug>AM_tsq
map <Leader>Tt <Plug>AM_tt
let mapleader = ","
" Sort NERDTree by Alpha
let NERDTreeSortOrder = []
" Quick cycling between windows
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
" Some Quick Commands
map <Leader>b :b#<CR>
map <Leader>, :NERDTreeToggle<CR>
map <Leader>f :Rfind
map <Leader>vf :RVfind
map <Leader>sf :RSfind
map <Leader>s :!
map <Leader>l :TlistToggle<CR>
map <Leader>z :ZoomWin<CR>
" Unimpaired configuration
" Bubble single lines
nmap <C-U> [e
nmap <C-D> ]e
" Bubble multiple lines
vmap <C-U> [egv
vmap <C-D> ]egv
" Enable syntastic syntax checking
let g:syntastic_enable_signs=1
let g:syntastic_quiet_warnings=1"
" Now load any machine specific config
if filereadable('~/.vim/vimrc-local')
source ~/.vim/vimrc-local
endif
runtime macros/matchit.vim
" Load Pathogen
silent! call pathogen#runtime_append_all_bundles()