My dotfiles. Period.

vimrc 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. " ....... "
  2. " PLUGINS "
  3. " ''''''' "
  4. execute pathogen#infect()
  5. let g:local_vimrc=".vimrc_local.vim"
  6. let python_highlight_all = 1
  7. let g:vim_markdown_folding_disabled=1
  8. let g:swap_custom_ops = ['and', 'or']
  9. nmap <F6> :SyntasticCheck<CR>
  10. set statusline+=%#warningmsg#
  11. set statusline+=%{SyntasticStatuslineFlag()}
  12. set statusline+=%*
  13. let g:syntastic_always_populate_loc_list = 1
  14. let g:syntastic_auto_loc_list = 0
  15. let g:syntastic_check_on_open = 0
  16. let g:syntastic_check_on_wq = 0
  17. let g:syntastic_mode_map = {
  18. \ "mode": "active",
  19. \ "active_filetypes": ["bash"],
  20. \ "passive_filetypes": ["python"] }
  21. " ..................... "
  22. " PROGRAM / ENVIRONMENT "
  23. " ''''''''''''''''''''' "
  24. set clipboard=unnamed
  25. set encoding=utf-8
  26. set fileencodings=ucs-bom,utf-8,cp1250,latin1
  27. set history=500
  28. if isdirectory($HOME . '/.local/share/vim') == 0
  29. :silent !mkdir -p ~/.vim/swap >/dev/null 2>&1
  30. endif
  31. set directory=./.vim-swap//
  32. set directory+=~/.local/share/vim/swap//
  33. set directory+=~/tmp//
  34. set directory+=.
  35. " ............ "
  36. " UI - GENERAL "
  37. " '''''''''''' "
  38. noremap <F2> :set list!<CR>
  39. set pastetoggle=<F4>
  40. nmap <F3> :set invnumber<CR>
  41. if has('mouse')
  42. set mouse=a
  43. endif
  44. if !exists(":DiffOrig")
  45. command DiffOrig vert new
  46. \ | set bt=nofile
  47. \ | r ++edit #
  48. \ | 0d_
  49. \ | diffthis
  50. \ | wincmd p
  51. \ | diffthis
  52. endif
  53. " ............ "
  54. " UI - EDITING "
  55. " '''''''''''' "
  56. set autoindent
  57. set backspace=indent,eol,start
  58. set expandtab
  59. set incsearch
  60. set shiftwidth=4
  61. set tabstop=4
  62. inoremap <C-Left> <C-P>
  63. inoremap <C-Right> <C-N>
  64. noremap p p`[
  65. noremap P P`[
  66. if has("autocmd")
  67. filetype plugin indent on
  68. augroup vimrcEx
  69. au!
  70. autocmd FileType text setlocal textwidth=78
  71. autocmd BufNewFile,BufReadPost *.md set filetype=markdown
  72. autocmd BufReadPost *
  73. \ if line("'\"") > 1 && line("'\"") <= line("$") |
  74. \ exe "normal! g`\"" |
  75. \ endif
  76. augroup END
  77. else
  78. set autoindent
  79. endif
  80. " .......... "
  81. " UI - LOOKS "
  82. " '''''''''' "
  83. set list
  84. set list listchars=tab:→\ ,trail:·,precedes:←
  85. set ruler
  86. set showcmd
  87. set nowrap
  88. if &t_Co > 2 || has("gui_running")
  89. syntax on
  90. set hlsearch
  91. endif
  92. colorscheme delek
  93. hi Folded ctermbg=NONE
  94. "set gfn=Droid\ Sans\ Mono\ 9
  95. set number
  96. highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE
  97. highlight MatchParen cterm=bold ctermfg=NONE ctermbg=black
  98. highlight Search term=NONE cterm=NONE ctermfg=NONE ctermbg=235 "DarkGreen
  99. if &term =~ "xterm\\|rxvt"
  100. silent !echo -ne "\033]12;gray75\007"
  101. let &t_SI = "\<Esc>]12;gray25\x7"
  102. let &t_EI = "\<Esc>]12;gray75\x7"
  103. autocmd VimLeave * let &t_me="\<Esc>]12;white\x7"
  104. endif