My dotfiles. Period.

vimrc 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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 encoding=utf-8
  54. set list listchars=tab:→\ ,trail:·,precedes:←
  55. set list
  56. noremap <F2> :set list!<CR>
  57. " my favorite indent style
  58. set tabstop=4
  59. set shiftwidth=4
  60. set expandtab
  61. let g:local_vimrc=".vimrc_local.vim"
  62. " for gvim
  63. colorscheme torte
  64. set gfn=Droid\ Sans\ Mono\ 9
  65. set fileencodings=ucs-bom,utf-8,cp1250,latin1
  66. let python_highlight_all = 1
  67. set number
  68. highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE
  69. set autoindent
  70. set pastetoggle=<F4>
  71. nmap <F3> :set invnumber<CR>