From: EdTheDev Date: Fri, 29 Jan 2021 14:48:45 +0000 (-0600) Subject: Move vim install into dedicated script. X-Git-Url: https://us-delaporte.pagekite.me/gitweb/dotfiles.git/commitdiff_plain/0a4c364e0a06e4ed4d6afa678e01b596be2964d3 Move vim install into dedicated script. --- 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