forked from tagliati/vimfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
203 lines (166 loc) · 4.3 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
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
Bundle 'L9'
Bundle 'tpope/vim-fugitive'
Bundle 'FuzzyFinder'
Bundle 'scrooloose/syntastic'
Bundle 'tpope/vim-endwise'
Bundle 'pangloss/vim-javascript'
Bundle 'mrtazz/molokai.vim'
Bundle 'vim-scala'
Bundle 'go.vim'
Bundle 'altercation/vim-colors-solarized'
Bundle 'spf13/vim-colors'
Bundle 'fugitive.vim'
Bundle 'klen/python-mode'
Bundle 'The-NERD-tree'
Bundle 'The-NERD-Commenter'
Bundle 'wting/rust.vim'
Bundle 'wombat256.vim'
Bundle 'surround.vim'
Bundle 'vim-jsbeautify'
"Setting VIMHOME
"
let $VIMHOME = $HOME."/.vim"
"Setting PYTHONPATH
let $PYTHONPATH .= ":".$VIMHOME."/python"
"Setting PATH
let $PATH .= ":".$VIMHOME."/python"
let g:LustyJugglerSuppressRubyWarning = 1
"Loading bundle plugins
call pathogen#runtime_append_all_bundles()
syntax on
filetype indent on
filetype plugin on
"Hidden mode
set hidden
set number
"Backspace
set backspace=2
"Bad whitespaces
autocmd BufEnter * highlight BadWhitespace ctermbg=red guibg=red
autocmd BufEnter * match BadWhitespace /^\t\+/
autocmd BufEnter * match BadWhitespace /\s\+$/
"Setting up tab settings
set tabstop=4
set shiftwidth=4
set softtabstop=4
set tabpagemax=20
set showtabline=4
set autoindent
set expandtab
set smartindent
set smarttab
set wildmenu
set wildmode=list:longest
set scrolloff=3
set showmode
set showcmd
set cursorline
set ttyfast
set ruler
set backspace=indent,eol,start
set laststatus=2
set nobackup
set noswapfile
set history=500 " remember more commands and search history
set undolevels=500 " use many muchos levels of undo
set wildignore=*.swp,*.bak,*.pyc,*.class
set title " change the terminal's title
set visualbell " don't beep
set noerrorbells " don't beep
set laststatus=2
" Python-mode
" Activate rope
" K Show python docs
" <Ctrl-Space> Rope autocomplete
" <Ctrl-c>g Rope goto definition
" <Ctrl-c>d Rope show documentation
" <Ctrl-c>f Rope find occurrences
" <Leader>b Set, unset breakpoint (g:pymode_breakpoint enabled)
" [[ Jump on previous class or function (normal, visual, operator modes)
" ]] Jump on next class or function (normal, visual, operator modes)
" [M Jump on previous class or method (normal, visual, operator modes)
" ]M Jump on next class or method (normal, visual, operator modes)
" Documentation
let g:pymode_doc = 1
let g:pymode_doc_key = 'K'
"Linting
let g:pymode_lint = 1
let g:pymode_lint_checker = "pyflakes,pep8"
let g:pymode_lint_ignore = "E501,E126,E127,W1401,C0110,C0301,R0201"
let g:pymode_lint_select = ""
" Auto check on save
let g:pymode_lint_write = 1
" Support virtualenv
let g:pymode_virtualenv = 1
" Enable breakpoints plugin
let g:pymode_breakpoint = 1
let g:pymode_breakpoint_key = '<leader>b'
" syntax highlighting
let g:pymode_indent=0
let g:pymode_syntax=0
" Don't autofold code
let g:pymode_folding = 0
"Increase HTML indent
let g:html_indent_inctags="html,head,body,tbody"
"Start mappings
"==============
"NERDTree
nmap <silent> <c-p> :NERDTreeToggle<CR>
"Tabs navigation
nmap <C-Tab> gt
nmap <C-S-Tab> gT
" Removes trailing spaces
function TrimWhiteSpace()
%s/\s*$//
''
endfunction
function InsertTabWrapper()
let col = col('.') - 1
if !col || getline('.')[col - 1] !~ '\k'
return "\<tab>"
else
return "\<c-p>"
endif
endfunction
inoremap <C-tab> <c-r>=InsertTabWrapper()<cr>
map <Leader>o :call TrimWhiteSpace()<CR>
"Moving lines
noremap <C-j> :m+<CR>==
noremap <C-k> :m-2<CR>==
noremap <C-j> <Esc>:m+<CR>==gi
noremap <C-k> <Esc>:m-2<CR>==gi
noremap <C-j> :m'>+<CR>gv=gv
noremap <C-k> :m-2<CR>gv=gv
vnoremap <C-l> xp
vnoremap <C-h> xhP
"Split resizing
map <C-S-Left> <c-w><
map <C-S-Right> <c-w>>
map <C-S-Up> <c-w>-
map <C-S-Down> <c-w>+
"============
"End mappings
set t_Co=256
colorscheme wombat256mod
set guifont=SourceCodePro-Regular:h12
if has("gui_running")
"Colorscheme
colorscheme wombat256mod
set guifont=SourceCodePro-Regular:h12
set antialias
set guioptions=egmt
set guioptions-=m
set fuoptions=maxvert,maxhorz
set go-=T
set bg=dark
set guioptions=T
set background=dark
endif
nmap <silent> <Leader>t :CtrlP<CR>