My dotfiles. Period.

vimrc 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. set t_vb=
  39. noremap <F2> :set list!<CR>
  40. set pastetoggle=<F4>
  41. nmap <F3> :set invnumber<CR>
  42. if has('mouse')
  43. set mouse=a
  44. endif
  45. if !exists(":DiffOrig")
  46. command DiffOrig vert new
  47. \ | set bt=nofile
  48. \ | r ++edit #
  49. \ | 0d_
  50. \ | diffthis
  51. \ | wincmd p
  52. \ | diffthis
  53. endif
  54. " ............ "
  55. " UI - EDITING "
  56. " '''''''''''' "
  57. set autoindent
  58. set backspace=indent,eol,start
  59. set expandtab
  60. set incsearch
  61. set shiftwidth=4
  62. set tabstop=4
  63. inoremap <C-Left> <C-P>
  64. inoremap <C-Right> <C-N>
  65. noremap p p`[
  66. noremap P P`[
  67. if has("autocmd")
  68. filetype plugin indent on
  69. augroup vimrcEx
  70. au!
  71. autocmd FileType text setlocal textwidth=78
  72. autocmd BufNewFile,BufReadPost *.md set filetype=markdown
  73. autocmd BufReadPost *
  74. \ if line("'\"") > 1 && line("'\"") <= line("$") |
  75. \ exe "normal! g`\"" |
  76. \ endif
  77. augroup END
  78. else
  79. set autoindent
  80. endif
  81. " .......... "
  82. " UI - LOOKS "
  83. " '''''''''' "
  84. set list
  85. set list listchars=tab:→\ ,trail:·,precedes:←
  86. set ruler
  87. set showcmd
  88. set nowrap
  89. if &t_Co > 2 || has("gui_running")
  90. syntax on
  91. set hlsearch
  92. endif
  93. colorscheme delek
  94. hi Folded ctermbg=NONE
  95. "set gfn=Droid\ Sans\ Mono\ 9
  96. set number
  97. highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE
  98. highlight MatchParen cterm=bold ctermfg=NONE ctermbg=black
  99. highlight Search term=NONE cterm=NONE ctermfg=NONE ctermbg=235 "DarkGreen
  100. if &term =~ "xterm\\|rxvt"
  101. silent !echo -ne "\033]12;gray75\007"
  102. let &t_SI = "\<Esc>]12;gray25\x7"
  103. let &t_EI = "\<Esc>]12;gray75\x7"
  104. autocmd VimLeave * let &t_me="\<Esc>]12;white\x7"
  105. endif