Comments (2)
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.
@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)
- macOS - No hotkey in Services HOT 3
- feature proposition: Automatic pasting HOT 5
- Can't auto refocus the previous editer after quit vim in Ubuntu18.04 HOT 2
- How to open a new buffer in current MacVim window? HOT 1
- Doesnt work on only i3wm? Really needs gnome? HOT 1
- Can't lock the PC, the lock file doesn't exist HOT 1
- Keybind Not Working in Chrome HOT 1
- Workflow starts, but nothing else happens HOT 1
- change key board shortcut on ubuntu HOT 1
- Switch to soft wrap on launch?
- Use without temp files on mac [suggestion]
- Plugin not working HOT 2
- Vim takes a long time to start after being invoked.
- Open Vim with selected text
- On Linux Mint Cinnamon: use `cinnamon-settings` or `dconf`
- Support without gvim. HOT 9
- Changing xclip to xsel for Linux HOT 2
- not working? (with screencast) HOT 2
- Windows version HOT 3
- put vim in insert mode automatically HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-anywhere.