Comments (10)
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.
Is xdotool a requirement for invoking keystrokes via the command line?
from vim-anywhere.
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.
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.
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.
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.
👍
from vim-anywhere.
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.
@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.
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)
- 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.