-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
270 lines (184 loc) · 7.36 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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
" All system-wide defaults are set in $VIMRUNTIME/debian.vim and sourced by
" the call to :runtime you can find below. If you wish to change any of those
" settings, you should do it in this file (/etc/vim/vimrc), since debian.vim
" will be overwritten everytime an upgrade of the vim packages is performed.
" It is recommended to make changes after sourcing debian.vim since it alters
" the value of the 'compatible' option.
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! debian.vim
" Vim will load $VIMRUNTIME/defaults.vim if the user does not have a vimrc.
" This happens after /etc/vim/vimrc(.local) are loaded, so it will override
" any settings in these files.
" If you don't want that to happen, uncomment the below line to prevent
" defaults.vim from being loaded.
" let g:skip_defaults_vim = 1
" Uncomment the next line to make Vim more Vi-compatible
" NOTE: debian.vim sets 'nocompatible'. Setting 'compatible' changes numerous
" options, so any other options should be set AFTER setting 'compatible'.
"set compatible
" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
if has("syntax")
syntax on
endif
" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
"set background=dark
" Uncomment the following to have Vim jump to the last position when
" reopening a file
"if has("autocmd")
" au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
"endif
" Uncomment the following to have Vim load indentation rules and plugins
" according to the detected filetype.
"if has("autocmd")
" filetype plugin indent on
"endif
" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
"set showcmd " Show (partial) command in status line.
"set showmatch " Show matching brackets.
"set ignorecase " Do case insensitive matching
"set smartcase " Do smart case matching
"set incsearch " Incremental search
"set autowrite " Automatically save before commands like :next and :make
"set hidden " Hide buffers when they are abandoned
"set mouse=a " Enable mouse usage (all modes)
" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
call plug#begin('~/.vim/plugged')
Plug 'https://github.com/scrooloose/nerdtree'
Plug 'https://github.com/editorconfig/editorconfig-vim'
Plug 'https://github.com/mattn/emmet-vim'
Plug 'airblade/vim-gitgutter'
Plug 'beyondwords/vim-twig'
Plug 'https://github.com/tpope/vim-surround'
"Plug 'https://github.com/itchyny/lightline.vim'
Plug 'https://github.com/vim-airline/vim-airline'
Plug 'https://github.com/stephpy/vim-php-cs-fixer'
Plug 'https://github.com/sirver/UltiSnips'
Plug 'https://github.com/honza/vim-snippets'
Plug 'phpactor/phpactor', {'for': 'php', 'do': 'composer install'}
Plug 'https://github.com/tpope/vim-commentary'
Plug 'https://github.com/vim-syntastic/syntastic'
Plug 'https://github.com/wsdjeg/vim-todo'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rhubarb'
Plug 'https://github.com/Yggdroot/LeaderF'
Plug 'https://github.com/jiangmiao/auto-pairs'
Plug 'ntpeters/vim-better-whitespace'
call plug#end()
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
imap jj <Esc>
map ,l :NERDTreeToggle<CR>
inoremap <Up> :echo "no"<CR>
inoremap <Down> :echo "no"<CR>
inoremap <Left> :echo "no"<CR>
inoremap <Right> :echo "no"<CR>
vnoremap <Up> :echo "no"<CR>
vnoremap <Down> :echo "no"<CR>
vnoremap <Right> :echo "no"<CR>
vnoremap <Left> :echo "no"<CR>
nnoremap <Up> :echo "no"<CR>
nnoremap <Down> :echo "no"<CR>
nnoremap <Right> :echo "no"<CR>
nnoremap <Left> :echo "no"<CR>
inoremap " ""<left>
inoremap ' ''<left>
inoremap ( ()<left>
inoremap [ []<left>
inoremap { {}<left>
inoremap {<CR> {<CR>}<ESC>O
inoremap {;<CR> {<CR>};<ESC>O
nnoremap zz :update<CR>
inoremap zz <Esc>:update<CR>
inoremap ; <Esc>$a;<Esc>
nnoremap ; <Esc>$a;<Esc>
nnoremap ,d g_lD
nnoremap ,h :noh<cr>
set relativenumber
set nu
nnoremap , :
map ,o :only<CR>
nnoremap ,g :G<CR>:only<CR>
nnoremap R :e<CR>
nmap <leader>F :Leaderf function<CR>
let g:molokai_original=1
colorscheme molokai
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"
let g:UltiSnipsSnippetDirectories=["UltiSnips", "personal-snippets"]
" If you use php-cs-fixer version 2.x
let g:php_cs_fixer_rules = "@PSR2" " options: --rules (default:@PSR2)
"let g:php_cs_fixer_cache = ".php_cs.cache" " options: --cache-file
"let g:php_cs_fixer_config_file = '.php_cs' " options: --config
" End of php-cs-fixer version 2 config params
let g:php_cs_fixer_php_path = "php" " Path to PHP
let g:php_cs_fixer_enable_default_mapping = 1 " Enable the mapping by default (<leader>pcd)
let g:php_cs_fixer_dry_run = 0 " Call command with dry-run option
let g:php_cs_fixer_verbose = 0 " Return the output of command if 1, else an inline information.
let g:php_cs_fixer_path = "~/php-cs-fixer-v2.phar" " define the path to the php-cs-fixer.phar
set laststatus=2
" PHPFACTOR CONFIG
"
" Include use statement
nmap <Leader>u :call phpactor#UseAdd()<CR>
" Invoke the context menu
nmap <Leader>mm :call phpactor#ContextMenu()<CR>
" Invoke the navigation menu
nmap <Leader>nn :call phpactor#Navigate()<CR>
" Goto definition of class or class member under the cursor
nmap <Leader>o :call phpactor#GotoDefinition()<CR>
" Show brief information about the symbol under the cursor
nmap <Leader>K :call phpactor#Hover()<CR>
" Transform the classes in the current file
nmap <Leader>tt :call phpactor#Transform()<CR>
" Generate a new class (replacing the current file)
nmap <Leader>cc :call phpactor#ClassNew()<CR>
" Extract expression (normal mode)
nmap <silent><Leader>ee :call phpactor#ExtractExpression(v:false)<CR>
" Extract expression from selection
vmap <silent><Leader>ee :<C-U>call phpactor#ExtractExpression(v:true)<CR>
" Extract method from selection
vmap <silent><Leader>em :<C-U>call phpactor#ExtractMethod()<CR>
let g:phpactorPhpBin = 'php'
let g:phpactorBranch = 'master'
let g:phpactorOmniAutoClassImport = v:true
autocmd FileType php setlocal omnifunc=phpactor#Complete
let &t_SI.="\e[5 q"
let &t_EI.="\e[1 q"
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 0
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" Syntastic configuration for PHP
let g:syntastic_php_checkers = ['php', 'phpcs', 'phpmd']
let g:syntastic_php_phpcs_exec = '~/RUDA/PPS-RUDA/vendor/bin/phpcs'
let g:syntastic_php_phpcs_args = '--standard=psr2'
let g:syntastic_php_phpmd_exec = '~/phpmd/phpmd/src/bin/phpmd'
let g:syntastic_php_phpmd_post_args = 'cleancode,codesize,controversial,design,unusedcode'
set scrolljump=15
set cursorline
set cursorcolumn
" hi CursorLine cterm=NONE ctermbg=234 ctermfg=NONE
set ruler
" save on jump
set autowrite
" auto reload file
set autoread
" SHARED CLIPBOARD
set clipboard+=unnamedplus
" UNDO CACHE
set undofile
set undodir=/tmp
"Latex CONF
map ,c zz:! pdflatex ~/pps/PPS_Franco_Ganga.tex<cr>
set mouse=
set spelllang=es
command Todo noautocmd vimgrep /TODO\|FIXME/j src/** | cw