aboutsummaryrefslogtreecommitdiff
path: root/modules/vim/vimrc.dot.link
blob: 3490924fdb6ca63a12b24c8ee0212d51a23ff170 (plain)
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
syn on
set nonu

set background=dark
set nobackup
set nowritebackup

set noautoindent
"set smartindent
set tabstop=2
set shiftwidth=2
set expandtab 
set mouse-=a
set autoread
set nocompatible

set title
set titleold="terminal"
set titlestring=vim:\ %F

" Folding
set foldmethod=syntax
let php_folding = 1
let g:sh_fold_enabled = 1

" PHP
let php_sql_query = 1

au BufNewFile,BufRead *.thtml setfiletype php
au BufNewFile,BufRead *.mdwn set ft=ikiwiki
au BufNewFile,BufRead *.rem set ft=remind

augroup mkd
 autocmd BufRead *.mkd  set ai formatoptions=tcroqn2 comments=n:>
augroup END

if has("autocmd")
  " Drupal *.module and *.install files.
  augroup module
    autocmd BufRead,BufNewFile *.profile set filetype=php
    autocmd BufRead,BufNewFile *.module  set filetype=php
    autocmd BufRead,BufNewFile *.install set filetype=php
    autocmd BufRead,BufNewFile *.test    set filetype=php
  augroup END
endif

" Pathogen - https://github.com/tpope/vim-pathogen
call pathogen#infect()

" No modelines
set nomodeline

" Syntax check
let g:syntastic_mode_map = { 'mode': 'passive',
                           \ 'active_filetypes': [],
                           \ 'passive_filetypes': [] }

" NERDTree section
" Thanks to http://stackoverflow.com/questions/1447334/how-do-you-add-nerdtree-to-your-vimrc

"autocmd VimEnter * NERDTree
"autocmd VimEnter * wincmd p

function OpenNERDTree()
  execute ":NERDTree"
  endfunction
  command -nargs=0 OpenNERDTree :call OpenNERDTree()

  nmap <ESC>t :OpenNERDTree<CR>