Git Product home page Git Product logo

Comments (2)

cknadler avatar cknadler commented on July 22, 2024 1

Once invoked, vim-anywhere will open a buffer. Close it and it's contents are copied to your clipboard and your previous application is refocused.

Thats pretty much what it does. For me, this saves me more than a single keystroke.

Just hotkey -> write -> :wq to have opened a vim buffer and copied it's contents into your clipboard automatically. I'm not sure of a faster way, but then again, if you are, feel free to open an issue with details.

As far as automatically copying original text and pasting result text, I've thought about adding these as configurable options, but they currently aren't implemented. If you have a good idea on how to implement either of these, I'd gladly accept a pull request.

Thanks.

from vim-anywhere.

thiswillbeyourgithub avatar thiswillbeyourgithub commented on July 22, 2024

@cknadler 3 years later :p you did great work so well why not try asking you directly

What do you think of this : add an option like "if the saved file has [p on an empty line] as its last character then paste it automatically, otherwise let the app work like before" ?

The "p" character could be changed to any other in simple variable in the run file.

To give an example, if you want it automatically pasted your file could look like this :

code
bla bla
coder things
p <- this is what I'm talking about

This also means that if in the settings a poweruser put a wildcard instead of a p then it would automatically paste it, which seems to be a sought-after behavior by some.

edit : it seems it can be almost done on linux by adding on line 59-60 of run

if [[ $($TMPFILE|egrep -m 1 .) == "p" ]]; then
        cat $TMPFILE | xclip -selection clipboard  #let's copy too it to be safe
        xclip -selection clipboard -out   # unfortunately this doesn't paste it outside the term and I don't understand why
else 
        cat $TMPFILE | xclip -selection clipboard   # current default 60th line
fi

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.