-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
71 lines (59 loc) · 1.29 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
set nu
set expandtab
set tabstop=4
set shiftwidth=4
set autoindent
set ruler
set cm=blowfish
set tabpagemax=50
syntax on
function! s:DiffWithSaved()
let filetype=&ft
diffthis
vnew | r # | normal! 1Gdd
diffthis
exe "setlocal bt=nofile bh=wipe nobl noswf ro ft=" . filetype
endfunction
com! DiffSaved call s:DiffWithSaved()
nnoremap <C-d> :DiffSaved
nnoremap <tab> >>
nnoremap <S-tab> <<
vnoremap <tab> >gv
vnoremap <S-tab> <gv
"ARROW KEY TAB NAVIGATION
nnoremap [1;6D :tabp
nnoremap [1;6C :tabn
"Open
nnoremap <C-o> :tabfind
"Comments
nnoremap <C-c> O/** * */kA
nnoremap <C-l> o*
nnoremap ç i<!-- -->hhhi
"Other
nnoremap <C-?> :echo bufname("%")
nnoremap <C-p> :!php -nl %
"Insert mode
inoremap <C-d> :DiffSaved
inoremap [1;6D :tabp
inoremap [1;6C :tabn
inoremap <C-o> :tabfind
inoremap <C-c> O/** * */kA
inoremap <C-l> *
nnoremap Ox ddkP
nnoremap Or ddp
colorscheme molokai
let g:badwolf_darkgutter = 1
let g:badwolf_tabline = 3
set cc=101
highlight lengthWarn ctermbg=234
au BufWinEnter * match lengthWarn /\%81v.\{1,20}/
highlight OverLength ctermbg=darkred
au BufWinEnter * 2match OverLength /\%101v.\+/
au BufRead,BufNewFile *.json set syntax=javascript
au BufRead,BufNewFile *.js set syntax=es6
au BufRead,BufNewFile *.scala set syntax=scala