cdpath Posted July 31, 2017 Share Posted July 31, 2017 (edited) This workflow simply: 1. save clipboard to a temporary file 2. open that temp file with MacVim 3. Waiting for you to finish editing (by default, you have 30s to edit) 4. Send edited content to clipboard GitHub repo, download from GitHub Edited July 31, 2017 by cdpath Link to comment
deanishe Posted July 31, 2017 Share Posted July 31, 2017 Couple of suggestions: The source code of your workflow isn't in the repo, only the Python script it uses. That makes it hard for people to make pull requests. Why don't you use the /usr/local/bin/mvim -f <filepath> command to open the file? This waits until the user closes the window, so you know when the user has actually finished editing the file. cdpath 1 Link to comment
cdpath Posted July 31, 2017 Author Share Posted July 31, 2017 4 hours ago, deanishe said: Couple of suggestions: The source code of your workflow isn't in the repo, only the Python script it uses. That makes it hard for people to make pull requests. Why don't you use the /usr/local/bin/mvim -f <filepath> command to open the file? This waits until the user closes the window, so you know when the user has actually finished editing the file. 1. I've updated source codes in GitHub 2. 'cos I don't know . I've rewrite the workflow according to your advice. Thank you! Link to comment
cdpath Posted August 1, 2017 Author Share Posted August 1, 2017 16 hours ago, deanishe said: Couple of suggestions: The source code of your workflow isn't in the repo, only the Python script it uses. That makes it hard for people to make pull requests. Why don't you use the /usr/local/bin/mvim -f <filepath> command to open the file? This waits until the user closes the window, so you know when the user has actually finished editing the file. Found a issue with MacVim 8.0 on macOS Sierra. When I `:wq` to finish editing, MacVim process still exists, and this workflow hang over there until I CMD-Q MacVim itself. So I have to use the following one to make sure MacVim is done, which, of cause will affect other MacVim window (if there is one). /usr/local/bin/mvim -f $filename && killall MacVim Is there a better way out? Thank you in advance! Link to comment
deanishe Posted August 1, 2017 Share Posted August 1, 2017 Hmm. On my machine, the command returns when I close the window it opened (i.e. I can leave other MacVim windows open and the application running). Link to comment
cdpath Posted October 24, 2017 Author Share Posted October 24, 2017 On 8/1/2017 at 10:12 PM, deanishe said: Hmm. On my machine, the command returns when I close the window it opened (i.e. I can leave other MacVim windows open and the application running). I found a setting in MacVim, 'Quit MacVim' after last window closes. Now it works. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now