
Use Atom to edit in Chrome - tuvistavie
https://github.com/tuvistavie/atomic-chrome
======
tuvistavie
To answer the questions of the use case, here is mine. I spend quite a lot of
time editing in Chrome, especially Github and StackOverflow, and found myself
doing the following:

* Start editing in Chrome

* It becomes long so copy-paste to Atom and edit there

* Copy-paste back to Chrome

To avoid this, I have then be using
[https://chrome.google.com/webstore/detail/wasavi/dgogifpkoil...](https://chrome.google.com/webstore/detail/wasavi/dgogifpkoilgiofhhhodbodcfgomelhe)
to edit directly in Chrome but thought that it would be better to use a real
editor rather than a subset, which is why I created this package.

I have an editor opened almost all the time, so pressing a shortcut and being
able to edit directly there without copy-pasting around is actually saving me
some time compared to my previous workflows.

------
Sir_Cmpwn
I use this Firefox add-on to edit text in gvim from time to time:

[https://addons.mozilla.org/en-US/firefox/addon/its-all-
text/...](https://addons.mozilla.org/en-US/firefox/addon/its-all-
text/?src=search)

But I don't see the advantage of editing text areas with atom, which presents
an extremely similar text editing experience compared to the experience the
text area already provided. On the other hand, moving to Vim to edit a
particuarly long comment or what have you makes more sense because I get to
use the crazy keybindings I've drilled into my fingers.

~~~
tuvistavie
Atom is a full featured text editor, like vim or emacs. The editing experience
is therefore way superior to Firefox or Chrome textarea, and you can use all
the shortcuts, plugins and goodies you are used to. For a short comment, a
basic textarea is of course enough, but when you write something a little
longer, I think it is a real gain of time to be able to edit in a real editor.

~~~
ben336
Atom has a very good vim-mode that implements vim key bindings. You can do
similar things to get emacs or custom key-bindings

------
lyall
A similar behavior is available with edit-server[1] and the accompanying
Chrome plugin[2] in Emacs.

[1]: [http://melpa.org/#/edit-server](http://melpa.org/#/edit-server) [2]:
[https://chrome.google.com/webstore/detail/edit-with-
emacs/lj...](https://chrome.google.com/webstore/detail/edit-with-
emacs/ljobjlafonikaiipfkggjbhkghgicgoh)

~~~
blisterpeanuts
Thanks, I was about to ask about Emacs.

What a cool idea.

------
docwhat
I like this idea. As Firefox tightens its sandbox security eventually things
like It's All Text! won't work anymore.

I have some bugs open on the project and maybe someday I can switch from Vim
to Atom comfortably.

I also hear that the It's All Text! author is lazy... every time I go home to
the family. ;-)

~~~
josteink
Hm. I love It's all text and use it all the time with my Firefox and Emacs
setup.

Are you saying that you're its developer, and that you're not going to
maintain it anymore?

That would certainly make me sad :(

~~~
docwhat
I'm glad you like IAT! I am indeed the developer.

I'll continue to maintain IAT! as long as it can work in Firefox.

Firefox is changing its security model for extensions to make it more like
Chrome's. Eventually, it will be impossible for IAT! to work as a pure
extension anymore.

Over the years, I've been working on IATED
([https://github.com/docwhat/iated](https://github.com/docwhat/iated)) which
was meant to be a replacement for IAT! -- a sort of IAT! next generation.

IATED would be two parts: a server to open the editor and an extension that
talks to it.

But I've become distracted and disheartened by figuring out how to make it as
simple to install and use as IAT! yet remain secure.

Some issues:

* I know enough security practices to know I'm not even close to being an expert. IATED has the potential to do really bad things if insecure. Letting a malicious page read random files on your file system (or worse, write them!) is the obvous vector.

* I would want to support the same platforms: Linux, OS X, and Windows. But each platform has very different requirements. Windows users are going to be confused if IATED is purely command line driven, for example.

* What language should I write it in. I have several false starts, with the current 'master' branch being JRuby. But depending on the JVM seems horrible. 'golang' is pretty new and maybe the way to go. I'm not sure.

* I work on IAT! mostly alone, though xOneca has been a great help. Writing IATED by myself is discouraging. I'd love to have someone who knows about golang or Windows or security help me write IATED.

Anyway, that's roughly the state of IAT! and IATED at the moment.

Ciao!

------
sridca
It would be even cooler if HTML input can be edited using markdown source.

For eg., you compile an email in Gmail, but edit it using Markdown in Atom (or
whatever editor); the final content gets rendered as HTML. Effectively you are
sending HTML email that was composed and edited in Markdown.

~~~
tedmiston
It would be so great to have that for Jira and its obscure formatting
conventions.

~~~
tuvistavie
Totally agree. I am going to give it a try. Thank you for the idea.

~~~
tedmiston
Awesome! I'm happy to help test - email in profile.

------
sandisk5
Use cases I thought of and I haven't even used it or similar plugins:

You want to use Atom's Markdown preview of a reddit comment or a github issue
or anything else that takes Markdown.

You want autosave of a comment/input in case you accidentally close the tab,
navigate away, or restart your browser.

You want to write code in a comment/email.

You want to use more advanced editing commands, things like undo-tree.

------
tedmiston
Does anyone else jump into an editor to write emails or essays?

I find myself wanting simple, distraction-free plain text with no UI cruft for
any writing more than a few sentences.

Personally I'm using either the Write Space extension for Chrome or Sublime
today, but it seems like the author has the same use case, and with the added
convenience of auto sync.

~~~
krisdol
Yes. For one, I don't trust myself to not accidentally hit a keyboard shortcut
I'm used to using on my native editor, but happens to collide with an
important function in the email client. I also despise gmail's interface in
general these days.

------
radarsat1
It would be cool if browsers simply created easy-to-find temporary files on
disk that mirror the contents of the text box, and can be copied or edited
externally. Then you could use whatever editor you want, or simply copy the
file to edit later. Hm.. maybe a FUSE filesystem could be used for this.

------
Myztiq
The only real use-case I can see here is getting access to multi-select, and
find/replace utilities, or perhaps other custom shortcuts you might use.
Overall a neat little trick. Atom is not my usual editor of choice but I could
see a few small potential use cases.

~~~
jakub_g
I usually copy-paste longish things to the text editor (or at least to
clipboard) to avoid data loss in case the webapp crashed / browser crashed /
HTTP request failed / I mistakenly pressed backspace when out of the textarea
(which navigates to previous page)

It happens rarely but when it happens, it hurts.

~~~
Myztiq
A browser extension I didn't know I wanted. Keeps history of textfields when I
navigate away, and gives me an option to restore.

~~~
jakub_g
There are some, like [1]

But I use many browsers, webapps reset the forms contents with JS etc. It's
complicated.

[1] [https://addons.mozilla.org/en-US/firefox/addon/lazarus-
form-...](https://addons.mozilla.org/en-US/firefox/addon/lazarus-form-
recovery/)

------
bonaldi
I love this. There used to be a TextMate plugin for Mac browsers that did the
same thing (well, without the live sync).

Am going to use this for some aged web forms at work that have pretty hostile
UX and that I often c&p into rather than bother trying to type.

------
uxcn
I'm still sad Pterosaur [1] is no longer maintained.

[1]
[https://github.com/ardagnir/pterosaur](https://github.com/ardagnir/pterosaur)

~~~
wangman
What about Vimperator or Pentadactyl?

~~~
uxcn
The _textareas_ are close, but it's not the same as having the actual editor.
I use UltiSnips a lot, which without the actual editor you can't use. It's the
same with a lot of Tim Pope's plugins (abolish, surround, etc...).

------
bduerst
Damn, I thought this meant Atom support on Chrome OS :(

There still isn't a good text editor that does regex find and regex replace
(caret doesn't).

~~~
profeta
if you can't install/compile vim on your computer it is not a computer

~~~
omaranto
I don't know if I could _install_ Vim on my father's Chromebook (probably
yes), but I do know it came _preinstalled_! That makes it a computer too,
right?

------
bsimpson
Sounds like GhostText:

[https://chrome.google.com/webstore/detail/ghosttext-for-
chro...](https://chrome.google.com/webstore/detail/ghosttext-for-
chrome/godiecgffnchndlihlpaajjcplehddca?hl=en)

------
laurent123456
If I need to edit outside my browser, I would normally just press Alt+Tab to
switch to my text editor, type the text, then Ctrl+C, Alt+Tab, Ctrl+V. It
feels about as fast and works with all web browsers and text editors.

~~~
tuvistavie
This is also what is used to do, and I found it added some unneeded overhead,
so I thought it would be easier to simply sync it.

------
unfamiliar
I used Automator on OS X to create a system service to do something like this.
Creating it was really simple - just a "Run Bash Script" action with
"/usr/local/bin/subl" in it. Right clicking text anywhere in the system and
choosing "Edit in Sublime" will open it in ST and replace the original text
once you save the file.

------
spudfkc
Cool, but not sure I'd use this. The only reason I could see this being used
is if you're writing code into a textarea that isn't syntax-aware, or if you
just really want vim keybindings when you're typing a long email.

------
banjobob
Could be cool to add this to a webapp with socket io. Make collaborative
coding.

~~~
darkvertex
Like Floobits for Atom?

[https://floobits.com/](https://floobits.com/)
[https://floobits.com/help/plugins/atom](https://floobits.com/help/plugins/atom)

They also support Sublime.

------
nickysielicki
I'd be more interested in a generic solution that makes a live mapping from
webkit internals to files via FUSE.

(I have zero experience with webkit to know if this is a reasonable
undertaking.)

------
chiliap2
This is a really cool idea, accidentally pressing my Sublime shortcuts on
website forms is definitely a very common mistake for me.

~~~
hudell
There are similar plugins for sublime out there.

------
weatherlight
I really like the idea and atom is my editor of choice but I struggling to
find a use case where I would use this day to day.

------
profeta
i'm more interested in the screenshots window manager.

having been forced on a mac recently... just the fact i can't move my windows
with <one key>+<mouse left button> is driving me crazy. and to add insult, the
title bar that i have to hit to move windows is smaller then anything on
browsers such as chrome and firefox.

~~~
jhasse
I _think_ that's i3. But it's Linux anyway, why would you be interested if you
have to use Mac?

~~~
profeta
i'm a moron. noted.

i guess i saw something that reminded me of the cocoa/whatever-osx-UI on the
the screenshots. but looking closer now, there is nothing other than atom and
chrome, both have custom inconsistent UIs that do not hint the OS they are
running on. you are right, it can be linux or anything else.

~~~
dlitvakb
You can use something like Divvy (Paid - on AppStore) or Spectacle (Free -
[https://www.spectacleapp.com/](https://www.spectacleapp.com/)) to achieve the
same effect

I personally use Divvy because Spectacle didn't exist when I first started
using mac

------
sambenson
Interesting concept, but why? Why would I use this?

~~~
jedisct1
Because editing text in a textarea is a horrible and frustrating experience?

------
juandazapata
Can somebody explain why would one ever want to use this? No trolling, I might
be missing something here. I just don't see any use for it right now.

~~~
AustinG08
Aside from some of the other mentions, this could be pretty neat for someone
who manages many WordPress sites, or any other CMS' for that matter.

------
boksiora
nice work :) i will use it

------
haiwenchen
nice!

------
bt3
Very cool, but I'm struggling to see the purpose of this. The time it would
take to focus on the textarea/ contenteditable field, then press the icon just
to begin typing from a different program seems like a waste. Either that, or
it has extremely narrow uses; none of which are readily apparent in my eyes.

------
mankash666
The screenshots demo-ing this tool in use shows the native WYSIWYG editors in
the respective sites to be more feaure rich and intuitive.

This seems like a fun programming exercise with little real utility.

~~~
tedmiston
The utility is the lower cognitive overhead of having all the UI that you
don't need hidden, responsiveness, and having more lines of text visible on
one screen. Similar reasons one might use WriteRoom.

~~~
mankash666
I'm certain WriteRoom serves a niche. If it indeed was such a pain point in,
WriteRoom should've achieved the scale of a .. Evrernote? Just saying that as
developers, we tend to believe that our own little quirks is how everyone on
the planet likes things to be.

------
mariusmg
Wow, this is sooo.....useless. Atom is Electron which is Chrome so you can run
2 Chrome instance and sync some text between them.

~~~
princejwesley
Two instances of chrome is not relevant here. Read first comment for its use.

------
rudolf0
As others say, there's no use for this.

It would be really cool to have some kind of a bidirectional WYSIWYG for web
design. Edit a text field in a Chromium window managed by Atom, and it makes
the same change in your template file (or even JSX file). Edit something in
your template, and the change is instantly painted to the browser window.

I know this wouldn't be trivial to implement, though.

~~~
paulirish
I believe you were downvoted as its somewhat offtopic, but I wanted to share
that your idea is implemented.
[https://developers.google.com/web/tools/setup/setup-
workflow...](https://developers.google.com/web/tools/setup/setup-
workflow?hl=en)

this works today, really well. give it a shot.

