Git Product home page Git Product logo

Comments (10)

lavignes avatar lavignes commented on July 22, 2024

As far as the Linux install is concerned we'll have to add xdotool as a dependency. Though I might just use the xclipboard buffer. By default in X any selected text is already in the xclipboard buffer.

The flow will be like so:

  • get window ID with xdotool
  • take the xclipboard buffer with xclip and put into a new vim buffer
  • on quit: refocus window with xdotool
  • xdotool type "file contents"

That's the the best way I know in Linux.

from vim-anywhere.

cknadler avatar cknadler commented on July 22, 2024

Is xdotool a requirement for invoking keystrokes via the command line?

from vim-anywhere.

lavignes avatar lavignes commented on July 22, 2024

It can simulate any input from the command line. It could also simulate a ctrl+v but that isn't as universal as just simulating typing the entire buffer. There could be some issues. But it needs to be implemented to know for sure.

from vim-anywhere.

cknadler avatar cknadler commented on July 22, 2024

Neat. Good to know. I'm less inclined to try to support this now that I know it will require external dependencies. Surprisingly, on OSX, it's all possible through AppleScript.

from vim-anywhere.

Hettomei avatar Hettomei commented on July 22, 2024

I think that "automatically past buffer in primary app at the end" is a bad idea, why ?

Here is my workflow for wich it fail :

  • starting a comment on a website
  • tell me "hum, it will be too long, switch to vim"
  • having all buffer populated with primary app
  • go throught the internet to improve my comment <-- here is the problem
  • forget to go back to the last selected text <-- and here
  • quit vim
  • lot of text pasted somewhere but not in previous area

That's why I prefere having to type cmd-v at the end.

from vim-anywhere.

cknadler avatar cknadler commented on July 22, 2024

@Hettomei

We would be implementing it under a separate keybinding. The default behavior wouldn't change. I'm with you, I prefer to manually type cmd-v.

from vim-anywhere.

simonweil avatar simonweil commented on July 22, 2024

👍

from vim-anywhere.

Govan avatar Govan commented on July 22, 2024

I've presently got a rough and ready version of copy-text-from-current-app-into-buffer working for OSX. Do you have any issues with taking pull requests that only work on one platform?

from vim-anywhere.

cknadler avatar cknadler commented on July 22, 2024

@Govan Sorry about the crazy late response.

I'd rather keep the feature set consistent across both platforms. That said, if you have something working on OSX, I bet we can figure it out and port it to Linux. Feel free to post a PR and we'll follow up. ^_^

from vim-anywhere.

anrddh avatar anrddh commented on July 22, 2024

Has any progress been made with this feature? I would love to contribute but I have no experience with AppleScript :(

from vim-anywhere.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.