This repository has been archived by the owner on Jun 14, 2018. It is now read-only.
/
vimrc
119 lines (103 loc) · 5.42 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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Filename: vimrc
" Maintainer: Joel Cain <teh.robut@gmail.com>
" URL: http://github.com/therobut/dotfiles
"
" BASED ON....
" Filename- .vimrc "
" Maintainer- Michael J. Smalley <michaeljsmalley@gmail.com> "
" URL- http://github.com/michaeljsmalley/dotfiles "
" "
" "
" Sections: "
" 01. General ................. General Vim behavior "
" 02. Events .................. General autocmd events "
" 03. Vim UI .................. User interface behavior "
" 04. Text Formatting/Layout .. Text, tab, indentation related "
" 05. Plugins ................. Using Vundle "
" 06. Theme/Colors ............ Colors, fonts, etc. "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 01. General "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible " get rid of Vi compatibility mode. SET FIRST!
set title
set titlestring=VIM:\ %-25.55F\ %a%r%m titlelen=70
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 02. Events "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
filetype plugin indent on " filetype detection[ON] plugin[ON] indent[ON]
" In Makefiles DO NOT use spaces instead of tabs
autocmd FileType make setlocal noexpandtab
" In Ruby files, use 2 spaces instead of 4 for tabs
autocmd FileType ruby setlocal sw=2 ts=2 sts=2
" Enable omnicompletion (to use, hold Ctrl+X then Ctrl+O while in Insert mode.
set ofu=syntaxcomplete#Complete
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 03. Vim UI "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set number " show line numbers
set cul " highlight current line
set laststatus=2 " last window always has a statusline
set nohlsearch " Don't continue to highlight searched phrases.
set incsearch " But do highlight as you type your search.
set ignorecase " Make searches case-insensitive.
set ruler " Always show info along bottom.
set showmatch
set statusline=%<%f\%h%m%r%=%-20.(line=%l\ \ col=%c%V\ \ totlin=%L%)\ \ \%h%m%r%=%-40(bytval=0x%B,%n%Y%)\%P
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 04. Text Formatting/Layout "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set autoindent " auto-indent
set tabstop=4 " tab spacing
set softtabstop=4 " unify
set shiftwidth=4 " indent/outdent by 4 columns
set shiftround " always indent/outdent to the nearest tabstop
set expandtab " use spaces instead of tabs
set smarttab " use tabs at the start of a line, spaces elsewhere
set nowrap " don't wrap text
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 05. Plugins (Vundle) "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let iCanHasVundle=1
let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
if !filereadable(vundle_readme)
echo 'Installing Vundle...'
echo ''
silent !mkdir -p ~/.vim/bundle
silent !git clone https://github.com/VundleVim/Vundle.vim ~/.vim/bundle/vundle
let iCanHasVundle=0
endif
set rtp+=~/.vim/bundle/vundle/
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
""" Add bundles (plugins) here """
Plugin 'crusoexia/vim-monokai'
Plugin 'PotatoesMaster/i3-vim-syntax'
Plugin 'fatih/vim-go'
Plugin 'digitaltoad/vim-pug'
Plugin 'therobut/vim-amber'
""" End Bundles """
call vundle#end()
if iCanHasVundle == 0
echo 'Installing Vundles. Please ignore key map error messages'
echo ''
:VundleInstall
endif
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 06. Theme/Colors "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set t_Co=256 " enable 256-color mode.
syntax enable " enable syntax highlighting (previously syntax on).
colorscheme monokai " set colorscheme
" Prettify JSON files
"autocmd BufRead,BufNewFile *.json set filetype=json
"autocmd Syntax json sou ~/.vim/syntax/json.vim
" Fix syntax highlighting for Amber (can't figure out why this wont work with
" my plugin alone...
autocmd BufRead,BufNewFile *.amber set filetype=amber
" Prettify Vagrantfile
autocmd BufRead,BufNewFile Vagrantfile set filetype=ruby
" Highlight characters that go over 80 columns
"highlight OverLength ctermbg=red ctermfg=white guibg=#592929
"match OverLength /\%81v.\+/