-
Notifications
You must be signed in to change notification settings - Fork 17
/
vimrc
81 lines (62 loc) · 2.36 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
set clipboard=unnamed
filetype plugin on
call pathogen#runtime_append_all_bundles() " adding pathogen to vimrc
call pathogen#helptags()
set nocompatible " choose no compatibility with legacy vi
syntax enable
set encoding=utf-8
set showcmd " display incomplete commands
filetype plugin indent on " load file type plugins + indentation
set colorcolumn=120
set number
"" Whitespace
set list
set nowrap " don't wrap lines
set tabstop=2 shiftwidth=2 " a tab is two spaces (or set this to 4)
set expandtab " use spaces, not tabs (optional)
set backspace=indent,eol,start " backspace through everything in insert mode
set listchars=tab:▸\ ,eol:¬
runtime macros/matchit.vim
"" Searching
set hlsearch " highlight matches
set incsearch " incremental searching
set ignorecase " searches are case insensitive...
set smartcase " ... unless they contain at least one capital letter
let g:gitgutter_enabled = 0
"" Plugins
nmap <F6> :TagbarToggle<CR> " mapping gt to TagbarToggle
nmap <F2> :NERDTreeToggle<CR> " mapping gn to NERDTreeToggle
nmap <F4> :TlistOpen<CR>
nmap <F5> :ToggleGitGutter<CR>
"" Mappings
:vnoremap . :norm.<CR>
"" Color Scheme
colorscheme xoria256
"" NERDTree Specific
let NERDTreeIgnore=['\.vim$','\*.pyc$','\.git[[dir]]']
"" File Extensions
autocmd BufRead,BufNewFile *.coffee set filetype=coffee
autocmd BufRead,BufNewFile *.coffee.erb set filetype=coffee
autocmd BufRead,BufNewFile *htm.erb set filetype=html
hi ColorColumn ctermbg=Black guibg=Black
hi CursorLine guibg=#9C9C9C
" " Enable fancy mode
let g:Powerline_symbols = 'fancy' " Powerline
let g:ctrlp_custom_ignore = {
\ 'dir': 'migrate$',
\ 'file': 'tags$',
\ }
"" Highlight trailing whitespace
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
functio! HighlightTabs()
syntax match TAB /\t/
highligh TAB ctermbg=yellow ctermfg=red
endfunction
autocmd BufWinEnter * call HighlightTabs()
autocmd InsertEnter * call HighlightTabs()
autocmd InsertLeave * call HighlightTabs()
autocmd BufWinLeave * call clearmatches()