.vimrc 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. " Make Vim no Vi-compatible
  2. set nocompatible
  3. " Enable syntax highlighting on a dark background
  4. syntax on
  5. set background=dark
  6. " Indentation/Tab
  7. set autoindent
  8. set expandtab
  9. set shiftwidth=4
  10. set tabstop=4
  11. "set textwidth=79
  12. " Incremental and highlight search
  13. set incsearch
  14. set hlsearch
  15. " Default history value is 20
  16. set history=100
  17. " Press F12 before pasting text to avoid crazy indentation
  18. set pastetoggle=<F12>
  19. " Show matching brackets.
  20. set showmatch
  21. " Enable wildmenu
  22. set wildmenu
  23. set wildignore+=*.swp,*.bak
  24. set wildignorecase
  25. set wildmode=full
  26. " Set backup
  27. if has("vms")
  28. set nobackup
  29. else
  30. set backup
  31. set backupdir=~/.vim/backup
  32. set directory=~/.vim/swap
  33. endif
  34. " Jump to the last position when reopening a file
  35. if has("autocmd")
  36. au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
  37. endif
  38. " Load personal colorscheme
  39. colo tshdarkbg
  40. nnoremap ;b :buffer *
  41. augroup Shebang
  42. autocmd BufNewFile *.sh 0put =\"#!/bin/bash\"|$
  43. autocmd BufNewFile *.py 0put =\"#!/usr/bin/python\"|$
  44. augroup END