xonecas.io
2780
D2

dotfiles-2014 / commit a8c4254

Run some commands when open some type of files.

sean2015-09-28 a8c4254851c2778d541a14c2ed680ab58f482ada parent 576d87e

2 files changed

vim_plugins.txt+2−2
@@ -1,10 +1,10 @@
1-https://github.com/jonathanfilip/vim-lucius.git
21 https://github.com/bling/vim-airline.git
2+https://github.com/jelera/vim-javascript-syntax.git
33 https://github.com/kchmck/vim-coffee-script.git
44 https://github.com/kien/ctrlp.vim.git
5-https://github.com/nathanaelkane/vim-indent-guides.git
65 https://github.com/pangloss/vim-javascript.git
76 https://github.com/scrooloose/nerdcommenter.git
87 https://github.com/scrooloose/syntastic.git
98 https://github.com/tpope/vim-fugitive.git
109 https://github.com/tpope/vim-haml.git
10+https://github.com/w0ng/vim-hybrid.git
vimrc+16−12
@@ -2,7 +2,7 @@ execute pathogen#infect()
22 syntax on
33 filetype plugin indent on
44
5-set number
5+set relativenumber
66 set nocompatible
77 set encoding=utf-8
88 set ruler
@@ -43,30 +43,26 @@ set tabstop=2
4343 set shiftwidth=2
4444 map <leader>2 :set ts=2 <bar> set sw=2<CR>
4545 map <leader>4 :set ts=4 <bar> set sw=4<CR>
46-" don't remove indent on python comments #
47-autocmd BufRead *.py inoremap # X<c-h>#<space>
48-
4946 command! Q q
5047 command! W w
5148
49+
50+" Colors
5251 set t_Co=256
5352 set t_ut=
54-set background=light
55-colorscheme lucius
56-LuciusWhiteHighContrast
53+set background=dark
54+let g:hybrid_use_Xresources = 1
55+colorscheme hybrid
56+
5757
5858 " Plugin stuff
59-let g:airline_theme="lucius"
59+let g:airline_theme="hybrid"
6060 let g:airline_powerline_fonts = 1
6161 let g:syntastic_javascript_checkers = ['jshint']
6262 let g:syntastic_python_checkers = ['flake8']
6363 let g:syntastic_sass_checkers = ['scss_lint']
6464 let g:ctrlp_custom_ignore = '\v\~$|\.(o|swp|pyc|wav|mp3|ogg|blend|min\.js|min\.css)$|(^|[/\\])\.(hg|git|bzr)($|[/\\])|__init__\.py|static_root'
6565
66-let g:indent_guides_auto_colors = 0
67-autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd ctermbg=254
68-autocmd VimEnter,Colorscheme * :hi IndentGuidesEven ctermbg=255
69-au VimEnter * :IndentGuidesEnable
7066
7167 " The Silver Searcher
7268 if executable('ag')
@@ -82,3 +78,11 @@ endif
8278
8379 " bind K to grep word under cursor
8480 nnoremap K :grep! "\b<C-R><C-W>\b"<CR>:cw<CR>
81+
82+
83+" don't remove indent on python comments #
84+autocmd BufNewFile,BufRead *.py inoremap # X<c-h>#<space>
85+" Set the right indent for each file.
86+autocmd BufNewFile,BufRead *.py ts=4 sw=4
87+autocmd BufNewFile,BufRead *.html ts=2 sw=2 setf htmldjango
88+autocmd BufNewFile,BufRead *.js,*.scss ts=4 sw=4