-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
98 lines (80 loc) · 2.04 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
set history=500
" plugins
execute pathogen#infect()
filetype on
filetype plugin on
filetype indent on
if !exists(":W")
" :W saves the file when permission denied
command W w !sudo tee % > /dev/null
endif
" search
set ignorecase
set smartcase
set hlsearch
set incsearch
"set runtimepath^=~/.vim/bundle/ctrlp.vim
"helptags ~/.vim/bundle/ctrlp.vim/doc
" syntax
syntax enable
colorscheme elflord
set background=dark
let &colorcolumn=+120
highlight ColorColumn ctermbg=Red
" encoding
set encoding=utf8
" backup
set nobackup
set nowb
set noswapfile
" text
set expandtab
set smarttab
set shiftwidth=4
set tabstop=4
set ai " auto indent
set si " smart indent
set wrap
"set foldmethod=indent
" movement
set ruler
set number
map j gj
map k gk
" paste
set pastetoggle=<F2>
" netrw
let g:netrw_keepdir=0
" nerdtree
"map <C-n> :NERDTreeToggle<CR>
"autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_php_checkers = ['php', 'phpcs', 'phpmd']
let g:syntastic_enable_perl_checker = 1
let g:syntastic_perl_checkers = ['perl', 'perlcritic']
let g:syntastic_php_phpcs_args='--standard=PSR2 --tab-width=4'
" perlomni remap
"inoremap <c-space> <c-x><c-o>
"inoremap <c-@> <c-space>
inoremap <c-@> <c-x><c-o>
" codesniffer & mess detector
" Pass arguments to phpcs binary
let g:phpqa_codesniffer_args = "--standard=PSR2"
" PHP codesniffer binary (default = phpcs)
let g:phpqa_codesniffer_cmd='phpcs'
" Run codesniffer on save (default = 1)
"let g:phpqa_codesniffer_autorun = 0
let g:phpqa_messdetector_cmd='phpmd'
" PHP Documentator
" autocmd FileType php inoremap <C-d> <ESC>:call PhpDocSingle()<CR>i
" autocmd FileType php nnoremap <C-d> :call PhpDocSingle()<CR>
" autocmd FileType php vnoremap <C-d> :call PhpDocRange()<CR>
let g:airline_powerline_fonts = 1
" YCM