Jump to content

Edit with… 4.1 beta for Alfred 4: A QuickCursor alternative


Recommended Posts

Beta: 4.1 for Alfred 4

First update for Alfred 4. Note that the BBCode keyword was not updated yet (may be removed after all).

 

Download

 

About QuickCursor

Altough I didn’t use QuickCursor because it was already unavailable due OSX sandbox, I find myself every now and then needing something like it.

Overview

You start typing in one application (e.g. a forum post, an email or a script in Apple Editor) then you realize you need a better editor or just want to type using your default text editor.

The common thing to do is select the text, copy it to the clipboard, open the text Editor, start a New Document then paste the content. After done you have to select the text, copy it to the clipboard then bring the initial application and finally paste the new content.

It’s not that hard but it can be faster...

Usage

  • in the initial application optionally select some text
  • bring Alfred and type the keyword editwith
  • now select your text editor: just start typing to find it and hit return key
  • the editor will be opened with the text you have selected initially or blank if there was no text initially
  • after writing, bring Alfred and type the keyword pasteback (the workflow will select the text automatically)
  • the previous application will be displayed and the text will be pasted back

In addition, the workflow saves the last used text editor so you can easily use it with a hotkey:

  • Optionally select text in the initial application
  • Hit the Edit with hotkey labeled “Copy” (the first one in the workflow)
  • After writing hit the second hotkey named “Paste Back”. Done.

You can also utilize the keyword pastebbcode so you can convert markdown into BBCode and then paste to the initial application. It can be very handy if you'd like to write a forum post with your Markdown text editor. The conversion is based on Markdown to BBCode workflow. Check the supported Markdown syntax in the workflow help (keyword editwith?).

 

Download

 

  • Version 4.0
  • Release Date 09 Jun 2016
  • OSX 10.11.5
  • Alfred 3
  •  

 

Edit With… for Alfred 2

  • Version 3.1
  • Release Date 24 Aug 2014
  • OSX 10.9.2
  • Download now

 

What’s new

 

Version 4.0

  • Alfred 3 support

Version 3.1

  • Yosemite support

Version 3.0

  • 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

Version 2.0

  • 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

Version 1.6

  • Cursor at the end of new pasted text

Version 1.5

  • The initial text selection is optional
  • When the new text is ready the workflow will select it
  • Alleyoop 2 support
Edited by Carlos-Sz
4.1 beta for Alfred 4 available
Link to comment

Edit With... A QuickCursor alternative

About QuickCursor

Altough I didn’t use QuickCursor because it was already unavailable due OS X sandbox, I find myself every now and then needing something like it.

Here it is the task

You start typing in one application (e.g. a forum post, an email, a script in Apple Editor etc.) then you realize you need a better editor or just want to type using your default text editor.

The common thing to do is select the text, copy it to the clipboard, open the text Editor (e.g. Byword), start a New Document the paste the content. After done you have to select the text, copy it to the clipboard then bring the initial application and finally paste the new content.

It’s not that hard but it can be faster.

Here it is what the workflow does

  • start typing in the initial application
  • select the text
  • bring Alfred and type the keyword ew
  • select your text editor and hit Return
  • the selected text editor will be opened with the text you have selected initially
  • after writing, select the text
  • bring Alfred and type the keyword pbew
  • the selected text will be pasted back in the initial application
There are a lot of steps but it works faster than it seems.

In addition, the workflow saves the last used text editor so you can easily use it with a hotkey:

  • Select text in the initial application
  • Hit the Edit with hotkey (the first one)
  • After writing select the text and hit the second hotkey
  • Done.
Screenshots

The workflow:

ew_w.png

Initial steps:

ew_00.png

After writing in the selected text editor:

ew_s2.png

Download

Version 1.0

Release Date 07 Apr 2013

Download now

 

Dl is broken.

Link to comment

My friend, will you please stop making us all look bad by making these ridiculously sweet workflows all the time? You crank out at least one AMAZING workflow every other day. Your just making other workflow creators look bad and worse, making me feel stupid for not being able to create one good simple workflow! STOP IT ALREADY! .... No seriously, please keep it up, lol.

 

 

@alfred staff - can we get this guy a legend tag or something under his name instead of just "member?" - It's deserved, along with a couple other members here...

 

I'm going to start a "workflow creator hall of fame" site. I think you'll get in on the first ballot. Hmm... **thinks to self** ---- not such a bad idea, about time you and the rest of the prolific workflow creators that share so much get recognized for their efforts. For now, I am going to start the hall of fame list in my signature...

 

THANK YOU FOR THIS WORKFLOW

Edited by twinpeaks
Link to comment

My friend, will you please stop making us all look bad by making these ridiculously sweet workflows all the time? You crank out at least one AMAZING workflow every other day. Your just making other workflow creators look bad and worse, making me feel stupid for not being able to create one good simple workflow! STOP IT ALREADY! .... No seriously, please keep it up, lol.

 

 

@alfred staff - can we get this guy a legend tag or something under his name instead of just "member?" - It's deserved, along with a couple other members here...

 

I'm going to start a "workflow creator hall of fame" site. I think you'll get in on the first ballot. Hmm... **thinks to self** ---- not such a bad idea, about time you and the rest of the prolific workflow creators that share so much get recognized for their efforts. For now, I am going to start the hall of fame list in my signature...

 

THANK YOU FOR THIS WORKFLOW

 

 

I’m glad you liked it!

 

And thank you for all the kind words. :)

Link to comment
Hey Carlos,

 

This is great, but generally it's a one-way insertion for me, and there's no text to copy initially. If I use your script without selecting any text, it pastes in the text from last use. Could you modify it so that if there is no text selected it loads the specified editor blank?

 

Also, could the script not automate the selection of text for the return? Save the need to press CMD-A!

 

Thanks :-)

 

Alex
Link to comment
Hey Carlos,
 
This is great, but generally it's a one-way insertion for me, and there's no text to copy initially. If I use your script without selecting any text, it pastes in the text from last use. Could you modify it so that if there is no text selected it loads the specified editor blank?
 
Also, could the script not automate the selection of text for the return? Save the need to press CMD-A!
 
Thanks :-)
 
Alex

 

I’ll see what I can do about the way you use most.

 

You say “not automate” or do you wish the workflow to select all text for you?

 

Right now the workflow consider two things: the user may want to edit part of a text and may want to paste back part of the new text.

 

However, as I said, I’ll see what can be done because I have already need something like that.

Link to comment
Hey Carlos,

 

Reading back "not automate" I can see how it could be confusing... yes I want it to automate the selection of the text, if no text is selected.

 

Looks like you've updated the workflow perfectly already. In fact, I've tested it out by using Sublime to write this reply to you now :-)

 

Thanks,

 

Alex
Link to comment
Hey Carlos,
 
Reading back "not automate" I can see how it could be confusing... yes I want it to automate the selection of the text, if no text is selected.
 
Looks like you've updated the workflow perfectly already. In fact, I've tested it out by using Sublime to write this reply to you now :-)
 
Thanks,
 
Alex

 

Great!

 

Hey Carlos, awesome workflow!! I was also sad to see that QuickCursor

 

Is there any chance however that you can make it so that after you select all the text and switch apps that the cursor is placed at the *end* of the text instead of the beginning. Saves one additional keystroke :)

 

I’ll try for sure because I’d like to see that too. Thank you for your feedback.

Link to comment

Hey Carlos, awesome workflow!! I was also sad to see that QuickCursor

 

Is there any chance however that you can make it so that after you select all the text and switch apps that the cursor is placed at the *end* of the text instead of the beginning. Saves one additional keystroke :)

 

Done. :)

 

 

Version 1.6 is out

  • Cursor at the end of new pasted text

See initial post for details.

Link to comment
  • 3 weeks later...

Hey :)

 

Thank you for making this. As a former user of quickcursor I find this extremely useful!!

 

I have a couple of issues/requests though if you find them relevant.

 

1) When I do ew and press enter I do not get a list of editors. Am I supposed to? At the moment I have to press space and type my editor (MacVim).

2) If I try to do select and send a second time it does not always work. I will have to experiment with this one a bit more to give more details.

3) With quick cursor the whole current text would be automatically selected if there was not a selection already. I find that this was better than always having to select the text before invoking the command.

 

Any thoughts?

 

best,

 

Dionysis

Link to comment

Great workflow, I am also going to be using this with Sublime. I was wondering is there anyway to ensure the selected text opens in a new tab not a new window as i have Sublime running most of the time with various columns and tabs.

 

Thanks

Link to comment

Hey :)

 

Thank you for making this. As a former user of quickcursor I find this extremely useful!!

 

I have a couple of issues/requests though if you find them relevant.

 

1) When I do ew and press enter I do not get a list of editors. Am I supposed to? At the moment I have to press space and type my editor (MacVim).

2) If I try to do select and send a second time it does not always work. I will have to experiment with this one a bit more to give more details.

3) With quick cursor the whole current text would be automatically selected if there was not a selection already. I find that this was better than always having to select the text before invoking the command.

 

Any thoughts?

 

best,

 

Dionysis

 

 

Hi

 

1) right now the workflow only uses Alfred internal feature to list applications but I’ll think in a way to make things easier when the user has already selected an application before.

 

2) the workflow uses a combination of keystrokes so maybe it’s just a matter of timing e.g. after hitting the paste back command let the keyboard free, without any typing and so on.

 

3) I couldn't find a way, using AppleScript, to do it. But I’ll make more tests ASAP.

 

Thank you for your feedback!

 

Great workflow, I am also going to be using this with Sublime. I was wondering is there anyway to ensure the selected text opens in a new tab not a new window as i have Sublime running most of the time with various columns and tabs.

 

Thanks

 

RIght now the workflow uses a generic formula to open a document. In fact, due some restrictions and even bugs I’ve found in some text editors regarding opening a document by using AppleScript, the workflow creates a new document and send a generic system (shell) open document that should be handled by the editor. In this case, maybe there is a way to set Sublime to open a new document in a tab instead of a new window. I’ll see what can be done.Thank you for your feedback!

Link to comment

Hey :)

 

Thank you for making this. As a former user of quickcursor I find this extremely useful!!

 

I have a couple of issues/requests though if you find them relevant.

 

1) When I do ew and press enter I do not get a list of editors. Am I supposed to? At the moment I have to press space and type my editor (MacVim).

2) If I try to do select and send a second time it does not always work. I will have to experiment with this one a bit more to give more details.

3) With quick cursor the whole current text would be automatically selected if there was not a selection already. I find that this was better than always having to select the text before invoking the command.

 

Any thoughts?

 

best,

 

Dionysis

 

3) can you please test the version of the workflow below? It tries to detect if there is a selected text by the user and if there is not then it will automatically select all text.

 

In addition, it will place the cursor at the end of the text in this step of the workflow too.

 

Download now

 

Thank you. :)

Link to comment

A bit off topic, but what is that sublime text theme in the screenshot?

 

Looks fantastic!

 

I think it’s this: link

 

:)

 

Hey :)

 

Thank you so much for taking the time to implement this!! It works!!

 

I am still getting a bit inconsistent behavior though. I think it happens only when I try to use the hot key to start the procedure. The hot key to paste the result works every time.

 

Here is a video of what is happening. Hope it is clear. If not let me know!

 

https://dl.dropboxusercontent.com/u/3421860/edit%20with%20tests.mov

 

Awesome video! I was testing using only keywords and now I was able to reproduce the issue.

 

Please try this version: download now

 

In addition, now the workflow will list the last used application right after you type the keyword ew making things a lot faster… :)

Link to comment

Simply brilliant :)

 

Man you are really fast!! Thank you so much. I was missing QuickCursor like crazy. I will update you if anything else crops up.

 

Thanks again!!!!!

 

Dionysis

 

Thank you!

 

Hey (again) :)

 

Just a little detail. When starting the workflow from an empty page (for example a new email) it will bring in the editor the last thing on the clipboard.

 

best,

 

Dionysis

 

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.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...