Old version(s) of vim config
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

77 lines
2.0 KiB

14 years ago
14 years ago
14 years ago
14 years ago
  1. filetype off
  2. call pathogen#runtime_append_all_bundles()
  3. filetype plugin indent on
  4. syntax enable
  5. " Set defaults [:h Q_op for abbrs]
  6. set nocompatible
  7. set ai et sw=2 ts=2 sts=2 " auto indent, 2 space tabs
  8. set ch=2 so=3 ls=2 " commandline, scrolloff, laststatus
  9. set dir=/var/tmp,/tmp " dir for swapfile
  10. set nofoldenable " turn off folding
  11. set splitbelow splitright " new window placement
  12. set list listchars=tab:»·,trail
  13. set statusline=%<%f\ %h%m%r\ %y\ %{fugitive#statusline()}%=%-16(\ %l,%c-%v\ %)%P
  14. " Enable 256 color xterm support
  15. au VimEnter * if &term == 'xterm' | set t_Co=256 | endif
  16. colorscheme wombat256mod
  17. function! GeomToggle()
  18. if (has("gui"))
  19. if s:gui_size=='norm'
  20. let s:gui_size='big'
  21. set columns=102
  22. set lines=32
  23. else
  24. set columns=120
  25. set lines=40
  26. let s:gui_size='norm'
  27. endif
  28. endif
  29. endfunction
  30. let s:gui_size='norm'
  31. if has("gui_running")
  32. set guifont=Monospace\ 10
  33. set cursorline
  34. set go=aegitt
  35. call GeomToggle()
  36. nmap <F4> :call GeomToggle()<CR>
  37. imap <F4> <Esc><F4>a
  38. " Map Alt-keys for fontsize
  39. nmap <M-+> <Plug>FontsizeInc
  40. nmap <M-=> <Plug>FontsizeInc
  41. nmap <M--> <Plug>FontsizeDec
  42. nmap <M-0> <Plug>FontsizeDefault
  43. endif
  44. " Settings for tpope's surround plugin
  45. let g:surround_45 = "<% \r -%>"
  46. let g:surround_61 = "<%= \r %>"
  47. autocmd FileType php let b:surround_45 = "<?php \r ?>"
  48. " Settings for rails plugin
  49. let g:rails_default_file='config/database.yml'
  50. autocmd User Rails silent! Rlcd
  51. " NERDTree settings
  52. map <silent> <leader>d :execute 'NERDTreeToggle'<CR>
  53. let g:NERDTreeWinSize=27
  54. " Set filetype for nginx confs
  55. au BufRead,BufNewFile /usr/local/conf/* set ft=nginx
  56. " XPTemplate setings
  57. let g:xptemplate_vars = 'author=J.Infield&email=jinfield@gmail.com&SParg='
  58. let g:xptemplate_bundle = 'javascript_jquery'
  59. " Misc mappings
  60. map <leader>c :lcd %:p:h <CR> " change to cwd of current file
  61. imap <C-Enter> <Down>
  62. imap <C-BS> <C-o>cc
  63. imap <M-o> <CR><CR><Up><Space><Space>
  64. imap <silent> <M-j> <C-o>J
  65. map <F1> <Esc>
  66. imap <F1> <Esc>