From dbf2c1021743774d1b79972d26bfc909979b75b9 Mon Sep 17 00:00:00 2001 From: "Eric D. Rohler" Date: Fri, 3 Apr 2020 03:26:32 -0400 Subject: [PATCH] updated install an vim --- install.ps1 | 60 ++++++++++++++++++++++++++++++++++++++++++---------- vim/init.vim | 6 ++---- 2 files changed, 51 insertions(+), 15 deletions(-) diff --git a/install.ps1 b/install.ps1 index ef7b9b0..71f39d1 100644 --- a/install.ps1 +++ b/install.ps1 @@ -1,34 +1,72 @@ -# User Profile -Write-Host "$($env:USERPROFILE)" -# VS Code Directory -Write-Host "$($env:APPDATA)\Code\User" -# Cmder Config Directory -Write-Host "$($env:CMDER_ROOT)\config" +# # Self-elevate the script if required +# if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { +# if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) { +# $CommandLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments +# Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine +# Exit +# } +# } + + +# User Profile +Write-Host "User Profile Directory: $($env:USERPROFILE)" + +# VS Code Directory +$app_data = $env:APPDATA +Write-Host "VS Code User Directory: $($app_data)\Code\User" +$vscode_user_settings_path = "$($app_data)\Code\User\settings.json" +Write-Host "VS Code User Settings Path: $($vscode_user_settings_path)" + +# Cmder Config Directory +$cmder_root = $env:CMDER_ROOT +Write-Host "Cmder Config Directory: $($cmder_root)\config" +$cmder_user_profile_cmd_path = "$($cmder_root)\config\user_profile.cmd" +Write-Host "Cmder CMD User Profile Path: $($cmder_user_profile_cmd_path)" +$cmder_user_aliases_cmd_path = "$($cmder_root)\config\user_aliases.cmd" +Write-Host "Cmder CMD Aliases Path: $($cmder_user_aliases_cmd_path)" +$cmder_user_profile_ps_path = "$($cmder_root)\config\user_profile.ps1" +Write-Host "Cmder PowerShell Profile Path: $($cmder_user_profile_ps_path)" + +# Neovim Config Directory +$local_app_data = $env:LOCALAPPDATA +Write-Host "Neovim Init Directory: $($local_app_data)\nvim" +$neovim_init_path = "$($local_app_data)\nvim\init.vim" +Write-Host "Neovim Init Path: $($neovim_init_path)" -$cmder_user_aliases_cmd_path = "$($env:CMDER_ROOT)\config\user_aliases.cmd" if (-not (Test-Path -Path $cmder_user_aliases_cmd_path)) { } else { Write-Host "Cmder User Aliases Exists" } -$cmder_user_profile_cmd_path = "$($env:CMDER_ROOT)\config\user_profile.cmd" + if (-not (Test-Path -Path $cmder_user_profile_cmd_path)) { } else { Write-Host "Cmder User Profile Exists" } -$cmder_user_profile_ps_path = "$($env:CMDER_ROOT)\config\user_profile.ps1" + if (-not (Test-Path -Path $cmder_user_profile_ps_path)) { } else { Write-Host "Cmder Powershell Profile Exists" } -$vscode_user_settings_path = "$($env:APPDATA)\Code\User" + if (-not (Test-Path -Path $vscode_user_settings_path)) { } else { Write-Host "VS Code User Settings Exists" -} \ No newline at end of file +} + +if (-not (Test-Path -Path $neovim_init_path)) { + Write-Host "Repo init.vim: $($PWD)\vim\init.vim" + New-Item -Path $neovim_init_path -ItemType SymbolicLink -Value "$($PWD)\vim\init.vim" + Get-Item -Path $neovim_init_path +} else { + Write-Host "Neovim Init Path Exists" +} + +Write-Host -NoNewline "Press any key to continue.." +$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") \ No newline at end of file diff --git a/vim/init.vim b/vim/init.vim index 21b893b..73a4abc 100644 --- a/vim/init.vim +++ b/vim/init.vim @@ -49,8 +49,8 @@ let python_highlight_all = 1 autocmd FileType python set sw=4 autocmd FileType python set ts=4 autocmd FileType python set sts=4 -let g:python_host_prog = 'C:\Python27\python' -let g:python3_host_prog = 'C:\Python37\python' +let g:python_host_prog = 'C:\Python27amd64' +let g:python3_host_prog = 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64' " Spell Checking autocmd BufRead,BufNewFile *.md set spell spelllang=en_us @@ -78,12 +78,10 @@ call plug#begin('~/AppData/Local/nvim/plugged') " Code Completion if has('nvim') Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } - Plug 'zchee/deoplete-jedi' else Plug 'Shougo/deoplete.nvim' Plug 'roxma/nvim-yarp' Plug 'roxma/vim-hug-neovim-rpc' - Plug 'zchee/deoplete-jedi' endif Plug 'mattn/emmet-vim' " HTML editing