diff --git a/win/npd.vbs b/win/npd.vbs new file mode 100644 index 0000000..90a4aaa --- /dev/null +++ b/win/npd.vbs @@ -0,0 +1,7 @@ +Set WshShell = WScript.CreateObject("WScript.Shell") +If wscript.arguments.count <2 then + WshShell.run "nvim-qt.exe" +Else + sCmd = "nvim-qt.exe " & """" & wscript.arguments(1) & """" + WshShell.run sCmd +End If diff --git a/win/setup.ps1 b/win/setup.ps1 index 410971a..8ae81c2 100644 --- a/win/setup.ps1 +++ b/win/setup.ps1 @@ -25,3 +25,7 @@ if (-not (Get-ScheduledTask -TaskName "Wubi No Shift")) { Install-Module posh-git Install-Module oh-my-posh + +# replace notepad with nvim-qt +reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "${dotfiles}\win\npd.vbs" /f +