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

Feature request: New target: replace active editor #77

Open
Strauman opened this issue Feb 21, 2019 · 2 comments
Open

Feature request: New target: replace active editor #77

Strauman opened this issue Feb 21, 2019 · 2 comments

Comments

@Strauman
Copy link

Motivation

If used to process the entire file, then instead of doing inplace processing, one would have the possibility to execute said file-processor when the file is not saved, as well as be able to process the contents without automatically overwriting the file.

Example usage

I'm using process-palette to do, amongst other things, prettifying of code. E.g. via autopep8 (prettifier for python).
Say I have a pretty big python file and run the implemented autopep8, then I might want to see what it does to my file before it does it. Then this feature would now take the text in the editor as input and return a replacement of all the text in the input, without the file getting saved.

Implementation thoughts

I imagine that it should be quite straight forward to just add a "Delete all contents"-instruction before doing the regular "Write to active editor" target?

@morassman
Copy link
Owner

This should be quite straight forward. I'll add this to the next version. I just can't promise a release date though.

@datavectors
Copy link

datavectors commented May 20, 2020

I have found that outboard processes (such as running file content in a different editor session) can be launched from Atom through process-palette command (I call it Run Proxy). Simply pass {Atom-variables} as args using Python module argsparse. I keep my external (proxy) scripts in ~/.atom-scripts/ and the process-palette custom command runs the external script.

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

No branches or pull requests

3 participants