Open rahuliyer95 opened 6 years ago
Hey Rahul,
Thanks for the PR! I'm not at all familiar with Windows, so it might take me a while to merge this. My concern is that if anything breaks, I won't be able to fix it and I'll have to pull support.
To anyone with a windows machine, can you test this branch and comment here if it works / doesn't work?
To anyone with windows programming experience, can you help me review the code proposed here? Any suggestions on how to make things simple and maintainable are greatly appreciated.
I'm able to get this mostly working, but for some reason the --nofork
option is getting lost. As near as I can tell, the Start-Process
cmdlet is being used properly, so I'm not sure where this happens.
When I run gvim -f
from command prompt, it works as expected, but the arguments list (:args
) is empty. When running from the script, the file is successfully written to, but by that time powershell has wiped it out and written nothing to the clipboard (it does not clobber previous data).
Anyone better at powershell than me care to take a look?
As a final note, I can get this (mostly) working on powershell 3.0, but 2.0 throws an error.
Well, part of the reason this isn't working is that Set-Clipboard
was not introduced until after 3.0.
I should be able to test this more fully this weekend.
You should run posh with no-profile
to make it faster. Also, I couldn't see the autohotkey shortcut installation. We would have to manually install it?
any updates for this?
Are any more changes needed from my end? Seems to be working fine for me
One little caveat: if you're using the latest vim version, remember to change the location as follows
function Find-BinaryPath() {
$VimBinaries = @(
"${env:ProgramFiles(x86)}\Vim\vim82\vim.exe",
"$env:ProgramFiles\Vim\vim82\vim.exe"
Otherwise the script won't execute and powershell will just flash.
@cknadler any plans on merging this into main at some point? I see this has been open for quite a while, but I understand the concern of having to support this if you're not using a Windows box. Perhaps this should be moved to its own repo/project instead.
Any updates on this?
38