My dotfiles. Period.

vimrc 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. execute pathogen#infect()
  2. "#### vrom vimrc_example.vim ####"
  3. " allow backspacing over everything in insert mode
  4. set backspace=indent,eol,start
  5. set history=500 " keep 50 lines of command line history
  6. set ruler " show the cursor position all the time
  7. set showcmd " display incomplete commands
  8. set incsearch " do incremental searching
  9. " In many terminal emulators the mouse works just fine, thus enable it.
  10. if has('mouse')
  11. set mouse=a
  12. endif
  13. " Switch syntax highlighting on, when the terminal has colors
  14. " Also switch on highlighting the last used search pattern.
  15. if &t_Co > 2 || has("gui_running")
  16. syntax on
  17. set hlsearch
  18. endif
  19. " Only do this part when compiled with support for autocommands.
  20. if has("autocmd")
  21. " Enable file type detection.
  22. " Use the default filetype settings, so that mail gets 'tw' set to 72,
  23. " 'cindent' is on in C files, etc.
  24. " Also load indent files, to automatically do language-dependent indenting.
  25. filetype plugin indent on
  26. " Put these in an autocmd group, so that we can delete them easily.
  27. augroup vimrcEx
  28. au!
  29. " For all text files set 'textwidth' to 78 characters.
  30. autocmd FileType text setlocal textwidth=78
  31. " When editing a file, always jump to the last known cursor position.
  32. " Don't do it when the position is invalid or when inside an event handler
  33. " (happens when dropping a file on gvim).
  34. " Also don't do it when the mark is in the first line, that is the default
  35. " position when opening a file.
  36. autocmd BufReadPost *
  37. \ if line("'\"") > 1 && line("'\"") <= line("$") |
  38. \ exe "normal! g`\"" |
  39. \ endif
  40. augroup END
  41. else
  42. set autoindent " always set autoindenting on
  43. endif " has("autocmd")
  44. " Convenient command to see the difference between the current buffer and the
  45. " file it was loaded from, thus the changes you made.
  46. " Only define it when not defined already.
  47. if !exists(":DiffOrig")
  48. command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
  49. \ | wincmd p | diffthis
  50. endif
  51. "########################
  52. "######## from me #######
  53. set listchars=tab:>-,precedes:<
  54. set list
  55. " my favorite indent style
  56. set tabstop=4
  57. set shiftwidth=4
  58. set expandtab
  59. let g:local_vimrc=".vimrc_local.vim"
  60. " for gvim
  61. colorscheme torte
  62. set gfn=Droid\ Sans\ Mono\ 9
  63. set fileencodings=ucs-bom,utf-8,cp1250,latin1
  64. let python_highlight_all = 1
  65. set number
  66. highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE
  67. set autoindent
  68. set pastetoggle=<F2>
  69. nmap <F3> :set invnumber<CR>