-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc.Windows
177 lines (154 loc) · 5.41 KB
/
.vimrc.Windows
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
set nocompatible
if has("gui_running")
set guifont=Menlo_for_Powerline:h12
" set guifont=Source_Code_Pro_for_Powerline:h12
" set guifont=DejaVu_Sans_Mono_for_Powerline:h12
set lines=44 columns=120 linespace=0
set encoding=utf-8
endif
" vundle boilerplate
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'altercation/vim-colors-solarized'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'vim-syntastic/syntastic'
" Plugin 'xolox/vim-misc'
Plugin 'ctrlpvim/ctrlp.vim'
" ----- Working with Git ----------------------------------------------
Plugin 'tpope/vim-fugitive'
" ----- Other text editing features -----------------------------------
Plugin 'Raimondi/delimitMate'
" ----- man pages, tmux -----------------------------------------------
" Plugin 'jez/vim-superman'
" Plugin 'christoomey/vim-tmux-navigator'
" ----- Syntax plugins ------------------------------------------------
" Plugin 'jez/vim-c0'
" Plugin 'jez/vim-ispc'
" Plugin 'kchmck/vim-coffee-script'
" ---- Extras/Advanced plugins ----------------------------------------
" Highlight and strip trailing whitespace
"Plugin 'ntpeters/vim-better-whitespace'
" Easily surround chunks of text
"Plugin 'tpope/vim-surround'
" Align CSV files at commas, align Markdown tables, and more
"Plugin 'godlygeek/tabular'
" Automaticall insert the closing HTML tag
"Plugin 'HTML-AutoCloseTag'
" Make tmux look like vim-airline (read README for extra instructions)
"Plugin 'edkolev/tmuxline.vim'
" All the other syntax plugins I use
"Plugin 'ekalinin/Dockerfile.vim'
"Plugin 'digitaltoad/vim-jade'
"Plugin 'tpope/vim-liquid'
"Plugin 'cakebaker/scss-syntax.vim'
call vundle#end()
filetype plugin indent on
set mouse=a
" Do not store stupid persistent undo files
if has('persistent_undo')
set noundofile
endif
" Enable syntax highlighting
syntax enable
" Highlight text past 80 columns
highlight OverLength ctermbg=red ctermfg=white
match OverLength /\%81v.\+/
" Shift operations set to 2 spaces
set shiftwidth=2
" Preserve indention level from the previous line
set smartindent
set autoindent
"No stupid outdent for scripting comments...
inoremap # X<C-H>#
"And no stupid shift-resistance either...
nnoremap <silent> >> :call ShiftLine()<CR>
function! ShiftLine()
set nosmartindent
normal! >>
set smartindent
endfunction
" Always turn Tab into spaces
set expandtab
" A tab counts for 2 spaces
set tabstop=2
set softtabstop=2
" See :help mapleader
:let mapleader=","
set showmatch " Show me matching close braces
set matchpairs+=<:> " match < > with the % command, too
set backspace=indent,eol,start " allow rational backspacing in insert mode
set comments=b:# " Most of my files use # for comments
" Don't highlight search results
set nohlsearch
set ruler
set number
set showcmd
" We need this for plugins like Syntastic
" which put symbols in the sign column.
hi clear SignColumn
autocmd FileType ruby,eruby set filetype=ruby.eruby.chef
" ------------------------ Status Line ------------------------------------
" set statusline=%f " Path to the file
" set statusline+=\ -\ " Separator
" set statusline+=FileType: " Label
" set statusline+=%y " Filetype of the file
" set statusline+=%= " Switch to the right side
" set statusline+=\row: " Label
" set statusline+=%4l " Current line
" set statusline+=/ " Separator
" set statusline+=%L " Total lines
" set statusline+=\ col: " Label
" set statusline+=%-3c " Column
" Always show the status line
" set laststatus=2
" ----- Plugin-Specific Settings --------------------------------------
" ----- altercation/vim-colors-solarized settings -----
colorscheme solarized
" Toggle this to "light" for light colorscheme
set background=dark
" Uncomment the next line if your terminal is not configured for solarized
"let g:solarized_termcolors=256
" ----- bling/vim-airline settings -----
" Always show statusbar
set laststatus=2
" Fancy arrow symbols, requires a patched font
" To install a patched font, run over to
" https://github.com/abertsch/Menlo-for-Powerline
" download all the .ttf files, double-click on them and click "Install"
" Finally, uncomment the next line
let g:airline_powerline_fonts = 1
" Show PASTE if in paste mode
let g:airline_detect_paste=1
" Show airline for tabs too
let g:airline#extensions#tabline#enabled=1
" Use the solarized theme for the Airline status bar
let g:airline_theme='solarized'
" ----- jistr/vim-nerdtree-tabs -----
" Open/close NERDTree Tabs with \t
nmap <silent> <leader>t :NERDTreeTabsToggle<CR>
" To have NERDTree always open on startup
let g:nerdtree_tabs_open_on_console_startup = 0
let g:nerdtree_tabs_open_on_gui_startup = 0
" ----- scrooloose/syntastic settings -----
let g:syntastic_aggregate_errors = 1
let g:syntastic_error_symbol = '?'
let g:syntastic_warning_symbol = "?"
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
" ----- Raimondi/delimitMate settings -----
let delimitMate_expand_cr = 1
augroup mydelimitMate
au!
au FileType markdown let b:delimitMate_nesting_quotes = ["`"]
au FileType python let b:delimitMate_nesting_quotes = ['"', "'"]
augroup END