From 0a4c364e0a06e4ed4d6afa678e01b596be2964d3 Mon Sep 17 00:00:00 2001 From: EdTheDev Date: Fri, 29 Jan 2021 08:48:45 -0600 Subject: [PATCH] Move vim install into dedicated script. --- bootstrap.ps1 | 15 +++++---------- install/vim.ps1 | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 10 deletions(-) create mode 100644 install/vim.ps1 diff --git a/bootstrap.ps1 b/bootstrap.ps1 index f534bad..68ea146 100644 --- a/bootstrap.ps1 +++ b/bootstrap.ps1 @@ -16,6 +16,8 @@ param( [switch]$dev_tools, [Parameter(Mandatory=$true, HelpMessage="Install Modeling Tools")] [switch]$archi, + [Parameter(Mandatory=$true, HelpMessage="Install Vim")] + [switch]$vim, ) # Setup my PowerShell Profile (on Windows) @@ -78,13 +80,6 @@ if($dev_tools){ ./install/dev.ps1 } -PowerShellGet\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force - -choco install vim - -# Install vim-plug -iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |` - ni $HOME/vimfiles/autoload/plug.vim -Force - -# Deploy a stub file to source my vimrc when on Windows. -cp win_vimrc ~/.vimrc +if($vim){ + ./install/vim.ps1 +} diff --git a/install/vim.ps1 b/install/vim.ps1 new file mode 100644 index 0000000..4d79552 --- /dev/null +++ b/install/vim.ps1 @@ -0,0 +1,26 @@ +<# +.SYNOPSIS + +Install Vim for Windows in the EdTheDev configuration. + +.DESCRIPTION + +Include Vim-Plug for plugin management. + +.NOTES + +Requires Chocolatey package manager. + +#> +PowerShellGet\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force + +choco install vim + +# Install vim-plug +iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |` + ni $HOME/vimfiles/autoload/plug.vim -Force + +# Deploy a stub file to source my vimrc when on Windows. +cp win_vimrc ~/.vimrc + +Write-Host "Be sure to run PlugInstall within Vim." \ No newline at end of file -- 2.47.3