-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
193 lines (161 loc) · 4.91 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
set nocompatible " Use Vim defaults (much better!)
set runtimepath=~/.neovim/,$VIMRUNTIME
syntax on
filetype off " required!
set rtp+=~/.neovim/bundle/Vundle.vim
call vundle#begin('~/.neovim/bundle')
" let Vundle manage Vundle
" required!
Plugin 'gmarik/Vundle.vim'
" Git
Plugin 'tpope/vim-fugitive'
" Web
Plugin 'pangloss/vim-javascript'
Plugin 'kchmck/vim-coffee-script'
Plugin 'hail2u/vim-css3-syntax'
Plugin 'gorodinskiy/vim-coloresque'
Plugin 'cakebaker/scss-syntax.vim'
Plugin 'groenewege/vim-less'
Plugin 'tpope/vim-haml'
Plugin 'mustache/vim-mustache-handlebars'
Plugin 'digitaltoad/vim-jade'
Plugin 'wavded/vim-stylus'
Plugin 'slim-template/vim-slim'
" Ruby
Plugin 'vim-ruby/vim-ruby'
Plugin 'tpope/vim-rails'
Plugin 'tpope/vim-bundler'
Plugin 'tpope/vim-endwise'
Plugin 'thoughtbot/vim-rspec'
Plugin 'ecomba/vim-ruby-refactoring'
" Node.js
Plugin 'moll/vim-node'
" Tools
Plugin 'tomtom/tcomment_vim'
Plugin 'mileszs/ack.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'ervandew/supertab'
Plugin 'bling/vim-airline'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'scrooloose/syntastic'
Plugin 'editorconfig-vim'
Plugin 'Chiel92/vim-autoformat'
Plugin 'mattn/emmet-vim'
Plugin 'Raimondi/delimitMate'
Plugin 'Valloric/YouCompleteMe'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-obsession'
Plugin 'dhruvasagar/vim-prosession'
" Theme
Plugin 'sickill/vim-monokai'
Plugin 'ciaranm/inkpot'
Plugin 'chriskempson/base16-vim'
Plugin 'altercation/vim-colors-solarized'
call vundle#end() " required
filetype plugin indent on " required
set background=dark
colorscheme base16-monokai
set autoread " ReaLoad a file if was changed outside of Vim
set cc=80 " Highlight column at 80
set nowrap " Disable line wrapping.
" Use intelligent case while searching.
" If search string contains an upper case letter, disable ignorecase.
set smartcase
set incsearch " Incremental search
set hlsearch " Higlihts search results
" Identation
set autoindent " Copy indent from current line when starting a new line
set smarttab
set tabstop=2 " Number of space og a <Tab> character
set softtabstop=2
set shiftwidth=2 " Number of spaces use by autoindent
set expandtab " Pressing <Tab> puts spaces, and < and > for indenting uses psaces
set backspace=2
" Commands execute automatically on an event
" Rules to disable expandtab in makefiles and markdown files
autocmd FileType make set noexpandtab nosta
autocmd FileType md set expandtab nosta
" Ruby autocomplete
autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
" Config Airline and status line
let g:smartusline_string_to_highlight = '(%n) %f '
set laststatus=2 " Seperate lines for state and mode
let g:airline_powerline_fonts=1 " Powerline simbols. Hermit font support it
let g:airline#extensions#tabline#enabled=1
let g:airline#extensions#branch#enabled=1
let g:airline#extensions#syntastic#enabled=1
"let g:airline_left_sep='?' " If we use a font without support of powerline simbols
"let g:airline_right_sep=''
set showmode " Show current mode in the status line.
set showcmd " Show the command in the status line.
" turn off any existing search
if has("autocmd")
au VimEnter * nohls
endif
" No icky toolbar, menu or scrollbars in the GUI
if has('gui')
set guioptions-=m
set guioptions-=T
set guioptions-=l
set guioptions-=L
set guioptions-=r
set guioptions-=R
end
" Show tabs and trailing whitespace visually
if (&termencoding == "utf-8") || has("gui_running")
if v:version >= 700
set list listchars=tab:»·,trail:·,extends:…,nbsp:‗
else
set list listchars=tab:»·,trail:·,extends:…
endif
else
if v:version >= 700
set list listchars=tab:>-,trail:.,extends:>,nbsp:_
else
set list listchars=tab:>-,trail:.,extends:>
endif
endif
set fillchars=fold:-
" Tabs and buffers
nmap <F5> :bprev<CR>
imap <F5> <Esc>:bprev<CR>
nmap <F6> :bnext<CR>
imap <F6> <Esc>:bnext<CR>
" tabs
nmap <C-S-tab> :tabprevious<cr>
nmap <C-tab> :tabnext<cr>
map <C-S-tab> :tabprevious<cr>
map <C-tab> :tabnext<cr>
imap <C-S-tab> <ESC>:tabprevious<cr>i
imap <C-tab> <ESC>:tabnext<cr>i
nmap <C-t> :tabnew<cr>
imap <C-t> <ESC>:tabnew<cr>
" Delete a buffer but keep layout
if has("eval")
command! Kwbd enew|bw #
nmap <C-w>! :Kwbd<CR>
endif
" Exit
imap <F12> <Esc>:qa<CR>
nmap <F12> :qa<CR>
" Enable/Disable line numbers
imap <F1> <Esc>:set<Space>nu!<CR>a
nmap <F1> :set<Space>nu!<CR>
" Saving
" Current buffer
imap <F2> <Esc>:w<CR>a
nmap <F2> :w<CR>
" All buffers
imap <F3> <Esc>:wa<CR>a
nmap <F3> :wa<CR>
" Enable/Disable showing search results
imap <F4> <Esc>:set<Space>hls!<CR>a
nmap <F4> :set<Space>hls!<CR>
" q: sucks
nmap q: :q
let g:prosession_default_session = 1
let g:prosession_tmux_title = 1
"source /usr/local/lib/python2.7/site-packages/powerline/bindings/vim/plugin/powerline.vim
"set laststatus=2