dotfiles/vim/.vimrc

54 lines
1.2 KiB
VimL
Raw Normal View History

2018-04-05 13:06:54 +02:00
set encoding=utf-8
execute pathogen#infect('plugins/{}')
execute pathogen#infect('snippets/{}')
autocmd vimenter * Helptags
syntax on
filetype plugin on
filetype plugin indent on
set number
set relativenumber
set autochdir
set expandtab
let &undodir = expand('~/.vim/.undo')
let &backupdir = expand('~/.vim/.backup//')
let &directory = expand('~/.vim/.swp//')
set undofile
colorscheme new-railscasts
source ~/.vim/config/plugin.vim
source ~/.vim/config/keybindings.vim
set tabstop=4
set shiftwidth=4
set cc=120
let g:netrw_liststyle = 3
let g:netrw_browse_split = 4
let g:netrw_winsize = 20
let g:netrw_altv = 0
let g:netrw_banner = 0
let g:tex_conceal = ""
function! ForceResizeNetrw()
let curWin = winnr()
for winnr in range(1, winnr('$'))
if getwinvar(winnr, '&ft')=="netrw"
if curWin != winnr
silent noautocmd exec winnr 'wincmd w'
silent noautocmd exec 'vertical resize ' . g:netrw_winsize
silent noautocmd exec curWin 'wincmd w'
else
silent noautocmd exec 'vertical resize ' . g:netrw_winsize
endif
endif
endfor
endfunction
autocmd WinEnter * call ForceResizeNetrw()
" autocmd VimEnter * Vex
autocmd BufNew * call ForceResizeNetrw()
" Transparency
hi Normal guibg=NONE ctermbg=NONE