APATH := $(realpath .)
FILES := bin
-DOTFILES := aliases bash* conky* flexget git* goobookrc msmtp* mutt ncmpcpp offlineimap* profile vim* weechat xbindkeysrc Xresources xprofile zprofile zshrc
-CONFIGFILES := compton.conf git mimeo.conf mpd retroarch xkb zsh
+DOTFILES := aliases bash* conky* flexget git* goobookrc msmtp* mutt ncmpcpp offlineimap* profile weechat xbindkeysrc Xresources xprofile zprofile zshrc
+CONFIGFILES := compton.conf git mimeo.conf mpd retroarch vim xkb zsh
.PHONY: install $(FILES) $(DOTFILES) $(CONFIGFILES)
install: $(FILES) $(DOTFILES) $(CONFIGFILES)
" Author: Samir Benmendil <samir.benmendil[at]gmail[dot]com>
"
+" use xdg
+set runtimepath=$XDG_CONFIG_HOME/vim,$VIMRUNTIME,$XDG_CONFIG_HOME/vim/after
+
filetype off
-set rtp+=~/.vim/bundle/vundle/
-call vundle#rc()
+set rtp+=$XDG_DATA_HOME/vim/vundle
+call vundle#rc('$XDG_DATA_HOME/vim')
Bundle 'gmarik/vundle'
Bundle 'wincent/Command-T'
" reading and writing files {{{1
set writebackup " write a backup file before overwriting a file
set backup " keep a backup after owerwriting a file
-set backupdir=$HOME/.vim/backupdir
+set backupdir=$XDG_CACHE_HOME/vim
set undofile " persistent undo history
-set undodir=$HOME/.vim/backupdir
+set undodir=$XDG_CACHE_HOME/vim
set autowrite " automatically write a file when leaving a modified buffer
" save with sudo
cmap w!! w !sudo tee % > /dev/null
+" the swap file {{{1
+set directory=$XDG_CACHE_HOME/vim,.,/var/tmp
+
" command line editing {{{1
set history=500 " how many command lines are remembered
set wildmode=longest:full " specifies how command line completion works
" various {{{1
set virtualedit=block " let cursor move past last char in <C-V> mode
-set viminfo='100,<50,s10,h,n~/.vim/viminfo " viminfo defaults but save file in .vim
+set viminfo='100,<50,s10,h,n$XDG_CACHE_HOME/vim/viminfo " viminfo defaults but save file in .vim
+
+set viewdir=$XDG_CACHE_HOME/vim
" plugins {{{1
" airline {{{2