-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
213 lines (183 loc) · 5.51 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
set nocompatible
set shell=/bin/bash
filetype off
"
" Setting up Vundle - the vim plugin bundler
let iCanHazVundle=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/gmarik/vundle ~/.vim/bundle/vundle
let iCanHazVundle=0
endif
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
"Add your bundles here
Bundle 'Syntastic'
Bundle 'altercation/vim-colors-solarized'
Bundle 'kien/ctrlp.vim'
" original repos on github
" Bundle 'kitofr/vim-functions'
Bundle 'neochrome/todo.vim'
Bundle 'scrooloose/nerdtree'
Bundle 'Align'
Bundle 'VimClojure'
Bundle 'surround.vim'
Bundle 'vimwiki'
Bundle 'vim-coffee-script'
" snipmate deps
Bundle "MarcWeber/vim-addon-mw-utils"
Bundle "tomtom/tlib_vim"
Bundle "honza/vim-snippets"
Bundle "garbas/vim-snipmate"
Bundle 'elixir-lang/vim-elixir'
Bundle 'carlosgaldino/elixir-snippets'
Bundle 'Puppet-Syntax-Highlighting'
Bundle 'epeli/slimux'
" colorschemes
Bundle 'Solarized'
Bundle 'wgibbs/vim-irblack'
Bundle 'oceandeep'
Bundle 'rdark'
Bundle 'peaksea'
Bundle 'wombat256.vim'
Bundle "DrTom/fsharp-vim"
Bundle "tpope/vim-fugitive"
"Bundle "tpope/vim-classpath"
Bundle "tpope/vim-dispatch"
Bundle "tpope/vim-fireplace"
"status line
Bundle "Lokaltog/powerline", { 'rtp': 'powerline/bindings/vim' }
"My snippets
Bundle 'kitofr/kitofr-snippets'
Plugin 'editorconfig-vim'
"...All your other bundles...
if iCanHazVundle == 0
echo "Installing Bundles, please ignore key map error messages"
echo ""
:BundleInstall
endif
" syntax for razor
Bundle "adamclerk/vim-razor"
Bundle "https://github.com/othree/javascript-libraries-syntax.vim.git"
" vim-scripts repos
" Bundle 'L9'
" Bundle 'FuzzyFinder'
" non github repos
" Bundle 'git://git.wincent.com/command-t.git'
filetype plugin indent on
set guifont=Inconsolata\ for\ Powerline:h15
let g:Powerline_symbols = 'fancy'
set encoding=utf-8
set t_Co=256
set fillchars+=stl:\ ,stlnc:\
set term=xterm-256color
set termencoding=utf-8
" Let's remember some things, like where the .vim folder is.
if has("win32") || has("win64")
let windows=1
let vimfiles=$HOME . "/vimfiles"
let sep=";"
else
let windows=0
let vimfiles=$HOME . "/.vim"
let sep=":"
endif
let classpath = join(
\[".",
\ "src", "src/main/clojure", "src/main/resources",
\ "test", "src/test/clojure", "src/test/resources",
\ "classes", "target/classes",
\ "lib/*", "lib/dev/*",
\ "bin",
\ vimfiles."/lib/*"
\],
\ sep)
" Settings for VimClojure
let vimclojureRoot = vimfiles."/bundle/vimclojure"
let vimclojure#HighlightBuiltins=1
let vimclojure#HighlightContrib=1
let vimclojure#DynamicHighlighting=1
let vimclojure#ParenRainbow=1
set bs=2
set vb
set nu!
set cursorline
" set cursorcolumn
set hlsearch
set expandtab " tabs to spaces, just do :retab
set tabstop=2
set softtabstop=2
set shiftwidth=2
set nocompatible " We're running Vim, not Vi!
syntax on " Enable syntax highlighting
filetype indent on " Enable filetype-specific indenting
filetype plugin on " Enable filetype-specific plugins
compiler ruby " Enable compiler support for ruby
set nobackup
set nowrap
set mouse=a
let mapleader = ","
let g:calendar_monday = 1
vnoremap <C-r> "hy:%s/<C-r>h//gc<left><left><left>
noremap <Up> <Nop>
noremap <Down> <Nop>
noremap <Left> <Nop>
noremap <Right> <Nop>
runtime macros/matchit.vim
filetype on " Enable filetype detection
set incsearch ignorecase hlsearch
nnoremap <silent> <Space> :silent noh<Bar>echo<CR>
command ExpandSplit execute "vertical resize 800"
" remove scrollers...
setglobal guioptions-=T " Disable toolbars by default
setglobal guioptions-=L
setglobal guioptions-=l
setglobal guioptions-=R
setglobal guioptions-=r
setglobal guioptions-=b
setglobal guioptions-=h
"vimdiff settings
map <silent> <leader>2 :diffget 2<CR> :diffupdate<CR>
map <silent> <leader>3 :diffget 3<CR> :diffupdate<CR>
map <silent> <leader>4 :diffget 4<CR> :diffupdate<CR>
"show/hide invisibles
nmap <leader>l :set list!<CR>
set listchars=tab:»\ ,eol:¬
"Vim masterclass
xnoremap . :norm.<CR>
"Invisible character colors
highlight NonText guifg=#4a4a59
highlight SpecialKey guifg=#4a4a59
""""""""""""""""""""""""""""""
" => Status line
""""""""""""""""""""""""""""""
" Always show the status line
set laststatus=2
" Format the status line
"set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l
" tpope's
set statusline=[%n]\ %<%.99f\ %h%w%m%r%{exists('*CapsLockStatusline')?CapsLockStatusline():''}%y%=%-16(\ %l,%c-%v\ %)%P
" Returns true if paste mode is enabled
function! HasPaste()
if &paste
return 'PASTE MODE '
en
return ''
endfunction
command CleanCR execute "%s/\\r\\(\\n\\)/\\1/g"
if has("autocmd")
autocmd bufwritepost .vimrc source $MYVIMRC
autocmd BufNewFile,BufReadPost Gemfile setfiletype ruby
autocmd BufNewFile,BufReadPost Guardfile setfiletype ruby
autocmd BufNewFile,BufReadPost *.cljx setfiletype clojure
autocmd BufNewFile,BufReadPost *.json setfiletype javascript
autocmd BufNewFile,BufReadPost *.md setfiletype markdown
autocmd ColorScheme * hi clear SpellBad
\| hi SpellBad cterm=underline,bold ctermfg=red
endif
nmap <leader>v :tabedit $MYVIMRC<CR>
colorscheme solarized "wombat256mod