dotfiles/vim/.vimrc
Tobias Manske 491fe6066f
VIM: Changed plugin management to vim-plug
Before switching I used pathogen.vim for plugin management, which
resulted in a HUGE .gitmodules file as well as a huge directory
containing whole git repositories. vim-plug fixes all those problems. It
reduces the folder into a config file, containing one line per plugin
and also removes the need of adding those submodules to .gitmodules

Signed-off-by: Tobias Manske <tobias.manske@mailbox.org>
2018-09-01 12:48:19 +02:00

60 lines
1.2 KiB
VimL
Executable File

" Plugin Manager
source ~/.vim/config/plugins.vim
" Make sure plug.vim is present
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
source ~/.vim/autoload/plug.vim
autocmd VimEnter * PlugInstall --sync
endif
" Prepare central backup/swap/undo directory
let &undodir = expand('~/.vim/.undo//')
let &backupdir = expand('~/.vim/.backup//')
let &directory = expand('~/.vim/.swp//')
syntax on
filetype plugin on
filetype plugin indent on
set encoding=utf-8
" Use whitespace instead of tab
set expandtab
" Make a tabulator equal 4 spaces
set tabstop=4
set shiftwidth=4
" Enable persistent undo
set undofile
" Use relative line numbers
set number
set relativenumber
" Set linelength indicator to 120 characters
set cc=120
" Natural window splitting
set splitbelow
set splitright
" Set colors
colorscheme happy_hacking
" Apply plugin configurations
source ~/.vim/config/pluginconfig.vim
" Apply custom keybindings
source ~/.vim/config/keybindings.vim
" Apply settings for custom filetypes
source ~/.vim/config/filetypes.vim
" Transparency
hi Normal guibg=NONE ctermbg=NONE