This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Bryan James Ross

By: a guest on Jan 13th, 2010  |  syntax: None  |  size: 1.94 KB  |  views: 77  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. " Bryan Ross' .vimrc file
  2.  
  3. " Testing
  4. " set verbose=10
  5.  
  6. " Use VIM as opposed to VI settings
  7. set nocompatible
  8.  
  9. " Turn on syntax highlighting
  10. syntax on
  11.  
  12. " Handle wrapping
  13. set linebreak
  14. set showbreak=>>\ \
  15.  
  16. " For changing tabs to spaces and back
  17. :command! -range=% -nargs=0 Tab2Space execute "<line1>,<line2>s/^\\t\\+/\\=substitute(submatch(0), '\\t', repeat(' ', ".&ts."), 'g')"
  18. :command! -range=% -nargs=0 Space2Tab execute "<line1>,<line2>s/^\\( \\{".&ts."\\}\\)\\+/\\=substitute(submatch(0), ' \\{".&ts."\\}', '\\t', 'g')"
  19.  
  20.  
  21. " Show Line Numbers
  22. set number
  23. set cursorline
  24.  
  25. " Set encoding, indent and scrolloff
  26. "set encoding=utf-8
  27. "set scrolloff=999
  28. set nolist
  29. set nosmartindent
  30. set noautoindent
  31. set autochdir
  32.  
  33. " Set status line
  34. set laststatus=2
  35. set statusline=
  36. set statusline+=%-3.3n
  37. set statusline+=\[%{strlen(&ft)?&ft:'none'}]
  38. set statusline+=\ %F
  39. set statusline+=%=
  40. set statusline+=0x%-8B
  41. set statusline+=%-14(%l,%c%V%)
  42. set statusline+=%<%P
  43.  
  44. " Show Command and Ruler
  45. set showcmd
  46. set ruler
  47.  
  48. set ignorecase
  49. set smartcase
  50. set wildmenu
  51. set showmode
  52. set visualbell
  53. set incsearch
  54. set hlsearch
  55.  
  56. " Handle buffer switching
  57. set switchbuf=useopen
  58.  
  59. " Add new windows to right and bottom (yay!)
  60. set splitright
  61. set splitbelow
  62.  
  63. " Enter key clears search
  64. :nnoremap <CR> :nohlsearch<CR>
  65.  
  66. " Enable filetype
  67. filetype on
  68. filetype indent on
  69. filetype plugin on
  70.  
  71. " Set cmd height
  72. set cmdheight=2
  73.  
  74. if has("win32") || has("win64")
  75.    set directory=$TMP
  76. else
  77.    set directory=/tmp
  78. end
  79.  
  80. " All ML stuff
  81. let g:allml_global_maps = 1
  82.  
  83. " Fix Backspace
  84. set backspace=indent,eol,start
  85.  
  86. " Set Tabbing
  87. set shiftwidth=2
  88. set tabstop=2
  89. set softtabstop=2
  90. set noexpandtab
  91. set smarttab
  92.  
  93. " Vim info
  94. set viminfo+=!
  95.  
  96. " Map to set CWD to file being edited
  97. map ,cd :cd %:p:h<CR>
  98.  
  99. " Highlight ALL Python
  100. let python_highlight_all = 1
  101.  
  102. " Nice trick for sudo
  103. cmap w!! %!sudo tee > /dev/null %
  104.  
  105. colorscheme wombat
  106. set formatoptions+=r
clone this paste RAW Paste Data