This repository has been archived by the owner on Apr 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
vimrc
executable file
·199 lines (162 loc) · 5.05 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
"#############################################################################
"
" vim-openerp configuration
" Stéphane WIRTEL
" Sebastien LANGE
"
" This file is a part of vim-openerp
"
" vim-openerp is free software: you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by
" the Free Software Foundation, either version 3 of the License, or
"
" vim-openerp is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
"
" You should have received a copy of the GNU General Public License
" along with this program. If not, see http://www.gnu.org/licenses.
"
"#############################################################################
" Enable Pathogen
execute pathogen#infect()
" Vim Flake8 shortcut change to F5 to reflect old pep8 plugin
autocmd FileType python map <buffer> <F5> :call Flake8()<CR>
" Automatically execute flake8 validation on python file write
autocmd BufWritePost *.py call Flake8()
syntax enable
syn sync minlines=300
set number
set incsearch
set hlsearch
set ignorecase
set smartcase
set tw=0
set sw=4
set sts=4
set cindent
set smartindent
set autoindent
set expandtab
set title
set cursorline
highlight CursorLine cterm=bold
"set listchars=tab:\|\ ,trail:.,extends:>,precedes:<,eol:$
set list listchars=tab:»·,trail:.
set nocompatible
"set digraph
filetype plugin indent on
set laststatus=2
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]\ [BUF=%n]\ %{strftime(\"%d-%m-%Y\ %H:%M:%S\",getftime(expand(\"%:p\")))}
set mouse=a
set backspace=indent,eol,start
"set guifont=Monospace\ Bold\ 12
let t_Co=256
"let g:DoxygenToolkit_authorName="Sebastien LANGE"
let g:DoxygenToolkit_commentType="python"
let g:DoxugenToolkit_briefTag_funcName="yes"
"Value for snippet
let g:snips_author="First Name, LAST NAME"
let NERDTreeIgnore = ['.pyc$']
" Shortcut to reload snippets
noremap <silent><F6> :call ResetSnippets()<CR>:call GetSnippets(snippets_dir, &ft)<CR>
au! BufRead,BufNewFile *.rml set ft=xml
"
map<F2> <ESC>:NERDTree<CR>
noremap <F3> <ESC>:Dox<CR>
inoremap <F3> <ESC>:Dox<CR>
nnoremap <F4> :GundoToggle<CR>
map<C-F12> <ESC>:set list!<CR>
map<F12> <ESC>:set wrap!<CR>
map <F9> :!psql -d dbname < % <BAR> less
let mapleader = ','
au BufRead .irbrc set ft=ruby
au! BufRead,BufNewFile *.haml set ft=haml
au! BufRead,BufNewFile *.sass set ft=sass
au! BufRead,BufNewFile .openerprc set ft=cfg
" PgSQL
au BufNewFile,BufRead *.pgsql setf pgsql
au BufRead /tmp/psql.edit.* set syntax=pgsql
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
autocmd FileType python setlocal colorcolumn=80
" Delete space in end file on write file
autocmd BufWritePre *.py :%s/\s\+$//e
let g:load_doxygen_syntax=1
vnoremap < <gv
vnoremap > >gv
vnoremap <silent>* yq/i\M<ESC>p<CR>
vnoremap <silent># yq?i\M<ESC>p<CR>
au FileType c,cpp,java set mps+==:;
set backupdir=/tmp
set directory=/tmp
set nowrap
" {{{1 folding (see :h folding)
" show all folds closed
set foldenable
" fold on markers tripple {
set foldmethod=marker
autocmd FileType c,cpp,d,perl,java,cs set foldmethod=syntax
autocmd FileType python,xml set foldmethod=indent
set foldcolumn=4
set foldlevel=0
"set foldmethod=indent
highlight Folded ctermfg=6 ctermbg=0
highlight FoldColumn ctermfg=6 ctermbg=0
map gf :tabedit <cfile><CR>
nmap <leader>rci :%!ruby-code-indenter<cr>
let g:rails_menu=2
map <silent><A-Right> :tabnext<CR>
map <silent><A-Left> :tabprevious<CR>
map <silent><A-Up> :move -2<CR>
map <silent><A-Down> :move +<CR>
map <C-Down> <C-e>
map <C-Up> <C-y>
noremap <A-S-Left> <C-w><
noremap <A-S-Right> <C-w>>
noremap <A-S-Up> <C-w>+
noremap <A-S-Down> <C-w>-
noremap <silent><C-S-Left> :execute 'tabmove ' . (tabpagenr()-2)<CR>
noremap <silent><C-S-Right> :execute 'tabmove ' . tabpagenr()<CR>
map <M-q> :bd<CR>
if has("autocmd")
autocmd BufEnter * if expand("%:p:h") !~ '://' | silent! lcd %:p:h | endif
endif
cabbr tb tab ball
cabbr td tab delete
"for activate the page down, up, etc, please comment the line below
"map <Left> <Esc>
"map <Down> <Esc>
"map <Up> <Esc>
"map <Right> <Esc>
"imap <Left> <Esc>
"imap <Down> <Esc>
"imap <Up> <Esc>
"imap <Right> <Esc>
map T :TaskList<CR>
map F :TlistToggle<CR>
vunmap T
vunmap F
"
" Uncomment this if you want to use pylint checker when you save your file
"
" autocmd FileType python compiler pylint
"
" Above is realized with :Pylint command. To disable calling Pylint every
" time a buffer is saved put into .vimrc file
"
" let g:pylint_onwrite = 0
"
" Displaying code rate calculated by Pylint can be avoided by setting
"
" let g:pylint_show_rate = 0
"
" Openning of QuickFix window can be disabled with
"
" let g:pylint_cwindow = 0
"
" uncomment this if you want use the 79 character max
"
" autocmd FileType python highlight OverLength ctermbg=red ctermfg=white guibg=#592929
" autocmd FileType python match OverLength /\%80v.*/
" autocmd FileType python set textwidth=79