Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for windows #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rahuliyer95
Copy link

#38

@cknadler
Copy link
Owner

cknadler commented Feb 18, 2018

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.

@deoxys314
Copy link

deoxys314 commented Feb 20, 2018

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.

@deoxys314
Copy link

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.

@giggio
Copy link

giggio commented Feb 26, 2018

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?

@ARezaK
Copy link

ARezaK commented Jul 29, 2019

any updates for this?

@rahuliyer95
Copy link
Author

Are any more changes needed from my end? Seems to be working fine for me

@kohane27
Copy link

kohane27 commented Feb 6, 2020

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.

@n3wjack
Copy link

n3wjack commented Jun 27, 2020

@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.

@jaggujajamensan
Copy link

Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants