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

-c option for vim-anywhere #69

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Conversation

sathomson
Copy link

@sathomson sathomson commented Feb 17, 2018

Hi Chris. Thanks for the idea of this script: very useful!

I thought a useful addition would be to include a -c option, which copies the contents of the clipboard to the temp file before editing takes place. Thus it is possible to edit a portion of text by first "copy"-ing it to the clipboard, and hitting a new shortcut key that activates the -c option. The text opens in gvim and can be edited, and is passed back to the clipboard as usual. Without the -c option, the script is as before.

Feel free to incorporate this into the main branch if you like.

Best regards,

Scott.

P.S.: I've only done this for Linux so far.

* Use Mod1 as the correct description for Alt in i3
* Add line for -c option
* remove erroneous double-quote
* In README: put in "echo" for i3 bindings
* Added line to readme for i3 config file location
@cknadler
Copy link
Owner

Hey Scott,

Thanks for the PR. Would this work cross platform (OSX, etc)?

@sathomson
Copy link
Author

It can also be done on OSX. Actually, I realised just after making my PR that PR #52 does the same job for Linux and OSX, except that it's achieved with a setting in a file rather than a switch. With the switch it's easy to set up two keybindings, depending on what you want to do at the time.

@cknadler
Copy link
Owner

Got it. I think I missed #52 when it was created, nice catch. If you can add OSX support and update the readme, I'd definitely be interested in merging this.

@sathomson
Copy link
Author

Currently in OSX it should now use the paste-in that #52 used; but there is no switch for this. #52 was using a settings file, but there should be a way to pass an option to the OSX workflow. I'll see if I can do something about this.

@sathomson
Copy link
Author

I think it now works on OSX. There are now two workflows that install as user services. The one VimAnywhere-CopyClipboard.workflow adds a second service to which a different shortcut key can be added.

First the user has to copy text to the clipboard before using this. MacVim has a more sophisticated workflow/service (in its Plist.info file inside its .app folder), which allows the user to highlight something and directly edit in MacVim.

masher2 added a commit to masher2/vim-anywhere that referenced this pull request Feb 10, 2019
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.

None yet

3 participants