# install vim-plug
md ~\vimfiles\autoload
$uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
(New-Object Net.WebClient).DownloadFile(
  $uri,
  $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath(
    "~\vimfiles\autoload\plug.vim"
  )
)

# create symlinks
New-Item -Type SymbolicLink -Path ~/.vimrc -Value $(Join-Path $PSScriptRoot .vimrc)
New-Item -Type SymbolicLink -Path ~/.ideavimrc -Value $(Join-Path $PSScriptRoot .ideavimrc)
New-Item -Type SymbolicLink -Path ~/.gitconfig -Value $(Join-Path $PSScriptRoot .gitconfig)
New-Item -Type SymbolicLink -Path ~/Documents/PowerShell/ -Value $(Join-Path $PSScriptRoot PowerShell)

# install modules
Install-Module posh-git
