Jump to content
Carlos-Sz

Edit with… 4.0 for Alfred 3: A QuickCursor alternative

Recommended Posts

Thank you!

 

 

Here is a new version that should fix this: download now

 

I’ll make more tests here too but its seems to be working with an empty document now.

Hi Carlos -

 

Brilliant effort here, I so miss QuickCursor :)

 

I can confirm that all your last fixes:

  • cursor at end of line
  • selecting all text if none selected
  • not using clipboard if document blank

totally work fine for me too.

 

Thanks so much!!

 

Oh and for anyone else that may have a similar issue to me not finding my text editor of choice (Sublime Text), if you have any apps in your home Applications folder you need to edit the: ew File Filter part of the Workflow to include search in: ~/Applications

 

[Not sure if that's worth just adding to the script or not Carlos?]

Share this post


Link to post

Hi Carlos -

 

Brilliant effort here, I so miss QuickCursor :)

 

I can confirm that all your last fixes:

  • cursor at end of line
  •  
  • selecting all text if none selected
  •  
  • not using clipboard if document blank
  •  

totally work fine for me too.

 

Thanks so much!!

 

Oh and for anyone else that may have a similar issue to me not finding my text editor of choice (Sublime Text), if you have any apps in your home Applications folder you need to edit the: ew File Filter part of the Workflow to include search in: ~/Applications

 

[Not sure if that's worth just adding to the script or not Carlos?]

 

Hi

 

Thank you for your feedback!

 

Regarding your question. Right now the workflow is expecting an editor from /Applications/ folder. I’ll also have to adjust the scripts in order to use an editor from home Applications too (not only the File Filter). I’ll see what I can do about it. :)

 

[update] Here is a new version that will also search and properly process an app from Home folder: download now

 

It is working here but let me know if it is working properly for you too. Thanks.

Edited by Carlos-Sz

Share this post


Link to post

carlos, thanks for another great workflow. is it possible to have the cursor be at the end of the text that is pasted back instead of at the end of the document?

Share this post


Link to post

carlos, thanks for another great workflow. is it possible to have the cursor be at the end of the text that is pasted back instead of at the end of the document?

 

It should do that… Can you make some tests please?

 

Everything working fine for me :D

 

Thank you!!!!

 

Great! :)

Share this post


Link to post

It should do that… Can you make some tests please?

 

 

Great! :)

 

I did try it with the OS X notes app, highlighted some text then ran alfred to edit with textedit then pb with alfred and it sent the cursor to the end of the note instead of the end of the selection. I also tried starting with textedit and then going to word and back to textedit with the same result.

Share this post


Link to post

Right now it will place the cursor at the end of the text, not the selection. If I find a way to detect the selection itself I will add the feature for sure. Thank you for your feedback.

I did try it with the OS X notes app, highlighted some text then ran alfred to edit with textedit then pb with alfred and it sent the cursor to the end of the note instead of the end of the selection. I also tried starting with textedit and then going to word and back to textedit with the same result.

Share this post


Link to post

Thanks for this workflow. Very handy. 

 

I'm also having problems. If I type "ew" I see nothing except "select your text editor) but no list or anyway to select. 

On the other hand if I type "ew" then space then name of editor it works (partly).

 

The other problem I face is that it will only put highlighted text into the new editor. I thought highlighting was optional. This problem slows me down the most. It's not horrible, and I can certainly work around it, but if I understand things correctly this is not intended behavior.

 

Using MacBook Air 11" with 10.8.3.

Share this post


Link to post

Thanks for this workflow. Very handy. 

 

I'm also having problems. If I type "ew" I see nothing except "select your text editor) but no list or anyway to select. 

On the other hand if I type "ew" then space then name of editor it works (partly).

 

The other problem I face is that it will only put highlighted text into the new editor. I thought highlighting was optional. This problem slows me down the most. It's not horrible, and I can certainly work around it, but if I understand things correctly this is not intended behavior.

 

Using MacBook Air 11" with 10.8.3.

 

It seems you’re using version 1.6 of the workflow. Please try this version: download now

 

Run the keyword ew at least once.

 

Later today I’ll release a new version based on it.

Share this post


Link to post

Version 2.0 is out:

  • Last used application listed right after the keyword ew (use the keyword at least once)
  • Curor at the end of the initial text too
  • The workflows detects if there is an initial selection otherwise it will select all text
  • The initial step does not require any text at all so you can start with a blank document
  • Supports Alfred 2.0.3 (187) AppleScript improvements

See initial post for details or download it now.

 

Thank you all for the great feedback!

Share this post


Link to post

Hi,

 

thank you very much for the workflow!

 

I have some problems with it using MacVim.

 

1. when I start the workflow, it does what it should (open the text in MacVim), but beeps three times indicating that something is wrong, and the Growl/Notification Center message is empty

2. more importantly - line endings are replaced with ^M, so the whole text is on one line making it uneditable...

 

Is there any way to avoid point 2? QuickCursor used to open the file with "real" line endings.

 

Thank you very much,

 

J

Share this post


Link to post

Hi,

 

thank you very much for the workflow!

 

I have some problems with it using MacVim.

 

1. when I start the workflow, it does what it should (open the text in MacVim), but beeps three times indicating that something is wrong, and the Growl/Notification Center message is empty

2. more importantly - line endings are replaced with ^M, so the whole text is on one line making it uneditable...

 

Is there any way to avoid point 2? QuickCursor used to open the file with "real" line endings.

 

Thank you very much,

 

J

 

The workflow only saves the clipboard content to a plain text file using a common AppleScript command (class UTF-8) and it seems more that MacVim can’t handle it or it is not properly configured.

 

I tested the workflow with several editors such as iA Writer, Byword, TextEdit, Sublime Text 2 and 3, Texts, Text Wrangler, Fraise, MultiMarkdown Composer, Mou and Folding Text and all of them worked fine.

 

As soon as possible I’ll test MacVim.

Share this post


Link to post

The growl notification is empty when using Byword but no complaints here. It works! I'll give MacVim a shot as well.

 

Thanks Carlos for this workflow! I used to use QuickCursor back in the day but of now it is not available. This is just a treat. :)

Share this post


Link to post

The growl notification is empty when using Byword but no complaints here. It works! I'll give MacVim a shot as well.

 

Thanks Carlos for this workflow! I used to use QuickCursor back in the day but of now it is not available. This is just a treat. :)

 

Thank you. I’m glad to hear the workflow is useful for you.

Share this post


Link to post

I have some problems with it using MacVim.

 

1. when I start the workflow, it does what it should (open the text in MacVim), but beeps three times indicating that something is wrong, and the Growl/Notification Center message is empty

2. more importantly - line endings are replaced with ^M, so the whole text is on one line making it uneditable...

 

Is there any way to avoid point 2? QuickCursor used to open the file with "real" line endings.

 

 

I had the problem with the line endings in MacVim as well. It is caused by the fact that the script uses CR as the line endings (and not LF or CRLF). By default, MacVim does not handle this. You can solve the problem if you explicitly tell vim to allow mac fileformat (and not only unix and dos), i.e. when I put

set fileformats=unix,dos,mac

into my .vimrc, then it works correctly for me.

 

Rainer

Edited by ashcatch

Share this post


Link to post

I had the problem with the line endings in MacVim as well. It is caused by the fact that the script uses CR as the line endings (and not LF or CRLF). By default, MacVim does not handle this. You can solve the problem if you explicitly tell vim to allow mac fileformat (and not only unix and dos), i.e. when I put

set fileformats=unix,dos,mac

into my .vimrc, then it works correctly for me.

 

Rainer

 

Thank you for figuring it out.

 

 

@All

 

I’ve tested the workflow with OS X Mavericks and it seems to be working properly.

Share this post


Link to post

Version 3.0 is out:


What’s new:


  • First step keyword is now editwith
  • Paste back keyword is now pasteback
  • New Paste BBCode Back keyword pastebbcode
  • New Help keyword editwith?
  • Hotkey for paste BBCode back
  • Removed Alleyoop support

See initial post for details.


Edited by Carlos-Sz

Share this post


Link to post

Thanks for the update. I installed, and restarted, my computer. First step keyword is still "ew" for me. And paste back is still "pb" for me. 

 

I don't think I really care what the codes are, but is there some reason editwith and pasteback are not working for me? BTW editith? does bring up Help. 

 

Also the cursor goes to the very bottom of an email for me now, whereas before it did go to wherever it had been placed before initiating Alfred. 

Share this post


Link to post

Thanks for the update. I installed, and restarted, my computer. First step keyword is still "ew" for me. And paste back is still "pb" for me. 

 

I don't think I really care what the codes are, but is there some reason editwith and pasteback are not working for me? BTW editith? does bring up Help. 

 

Also the cursor goes to the very bottom of an email for me now, whereas before it did go to wherever it had been placed before initiating Alfred. 

 

Please, try to:

 

  • delete the workflow from Alfred
  • make sure Alfred 2 is updated
  • download it again: Edit With 3.0
  • install the workflow

I didn’t change how the cursor is placed but make sure to not have unnecessary empty lines because the workflow is set to go to the end of the document.

Share this post


Link to post

Awesome workflow! 


 

However I got two problems: 

When I'm writing here and then typing 

editwith 

I end up with "^M" instead of linkebreaks.

(^M actually means "enter"). 

 

 

The second problem is: editwith -> pasteback -> editwith 

does not work with macvim.

 

 

I thank you so much for this workflow! Using it all day :P

Share this post


Link to post

 

Awesome workflow! 
 
However I got two problems: 
When I'm writing here and then typing 
editwith 
I end up with "^M" instead of linkebreaks.
(^M actually means "enter"). 
 
 
The second problem is: editwith -> pasteback -> editwith 
does not work with macvim.
 
 
I thank you so much for this workflow! Using it all day :P

 

 

 

MacVim requires an adjustment as seen in post #43 above.

 

I’m using ByWord and everything looks fine. Maybe it is a matter of file format (again, see post #43 above).

 

Anyway, please make a test with other text editor such as the Mac OSX default one (TextEdit.app).

 

Thank you for your feedback! :)

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...