forked from rogeriopvl/.vim
-
Notifications
You must be signed in to change notification settings - Fork 1
/
vimrc
67 lines (49 loc) · 1.31 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
silent execute '!mkdir -p ~/.vim/tmp'
call pathogen#infect()
set nocompatible
set nobackup
set backupdir=~/.vim/tmp//
set directory=~/.vim/tmp//
set enc=utf-8
set fileformat=unix
set ignorecase
set smartcase
set incsearch
set nu! " show line numbers
set ruler
set visualbell
set tabstop=4
set shiftwidth=4
set expandtab
set autoindent
set smartindent
set smarttab
set bs=start,indent,eol
syntax enable
set background=dark
if has('gui_running')
colorscheme solarized
else
colorscheme desert
endif
set gfn=monaco:h12
" show/hide all whitespace chars
nmap <silent> <leader>s :set nolist!<CR>
" Key to toggle nerdtree display
map <leader>l :NERDTreeToggle<CR>
" Key to toggle tagbar display
map <leader>k :TagbarToggle<CR>
" set spacing scheme for ruby files
autocmd Filetype ruby setlocal ts=2 sts=2 sw=2
" run php file with php cli
autocmd Filetype php noremap <C-M> :w!<CR>:!/usr/bin/php %<CR>
" check the php syntax
autocmd Filetype php noremap <C-L> :!/usr/bin/php -l %<CR>
" enable omnicomplete for php files
filetype indent on
filetype plugin on
au FileType php set omnifunc=phpcomplete#CompletePHP
au BufRead,BufNewFile *.php set filetype=php.html
au BufRead,BufNewFile *.ejs set filetype=html
" :h last-position-jump
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal!g`\"" | endif