-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
71 lines (56 loc) · 1.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
call plug#begin('~/.vim/bundle')
call plug#end()
set nocompatible
"set number
set relativenumber
set autoindent
set shiftwidth=2
set softtabstop=2
set expandtab
if has("vms")
set nobackup
else
set backup
endif
set backupdir=/tmp,.
set directory=/tmp,.
set history=50
set ruler
set showcmd
syntax enable
set laststatus=2
set path+=** " Search in subfolders
set wildmenu
let g:netrw_preview=1 " Vertical preview window
let g:netrw_banner=1 " Hide banner
"let g:netrw_altv="&spl"
"let g:netrw_browse_split=2
let g:netrw_winsize=-40
let g:netrw_liststyle=3
let g:netrw_localrmdir="rm -r"
let g:netrw_localcopycmd="cp"
let g:netrw_keepdir=0
" Toggle Vexplore with Ctrl-E
function! ToggleLexplore()
if exists("t:expl_buf_num")
let expl_win_num = bufwinnr(t:expl_buf_num)
if expl_win_num != -1
let cur_win_nr = winnr()
exec expl_win_num . 'wincmd w'
close
exec cur_win_nr . 'wincmd w'
unlet t:expl_buf_num
else
unlet t:expl_buf_num
endif
else
exec '1wincmd w'
Lexplore
let t:expl_buf_num = bufnr("%")
endif
endfunction
map <silent> <C-E> :call ToggleLexplore()<CR>
filetype plugin indent on " for omni completion
" Snippets
autocmd FileType php abbr afre foreach ( as ) {<CR>}<ESC>O<ESC>kf(a
autocmd FileType php abbr afr for ($i=0; $i < $length; $i++) {<CR>}<ESC>O