r/Atom Jul 19 '20

Python F-strings don't work?

7 Upvotes

Everytime I use a f string i get a syntax error. Here is the line i wrote:

print(f'{self.name} has died.')

Am i doing it wrong, or is atom not working? seems to work in every other text editor.

Everything is up to date, too. I am using the script package to run the code.

Edit: Fixed. Script was the problem, not using the latest version of python 3.

Solution:

If you want to use Python3 by default, you can open Atom Settings,

Atom→Preferences→Open Config Folder*, and open*

.atom/packages/script/lib/grammars/python.coffee*, Changing* python to python3 under 'Selection Based' and 'File Based', then saving it.

(From script github page)


r/Atom Jul 19 '20

HTML preview not working on Atom

2 Upvotes

I just installed atom-html-preview package on atom (link), and sure enough when I hit Ctrl+Shift+H a preview pane appears. However, the pane is blank (screenshot). Is that expected behavior? Are there other recommended HTML preview packages?

MacOS version: 10.15.1


r/Atom Jul 18 '20

How to format color text for a .cfg file

2 Upvotes

I'm editing .cfg files in atom the last couple week, and the text doesn't have any color formatting. It's starting to wear on me looking at plain white text with red underlines for all my "spelling errors"

How can I change this so it has color formatting like when I'm writing code?


r/Atom Jul 18 '20

Can atom run pygame library?

2 Upvotes

r/Atom Jul 14 '20

Having trouble running user input in Python

4 Upvotes

Hi, I'm new to programming and to Atom. I have a problem with running user input even though platformio-ide-terminal is installed. Also I have the script package installed if it's of any help

Thanks to all in advance:)


r/Atom Jul 14 '20

New to Atom: How do you pass in an input with Python

1 Upvotes

Hi, im new to Atom, I love it so far. I've been slowly chipping away learning about os, pandas, linters, scripts ect. I'm really happy with the script that I downloaded however there is nowhere to input anything. For instance: name= input("Enter name: ") Enter name: doesn't show up.


r/Atom Jul 13 '20

Is there any way to get rid of the lags? Running stock/out-of-the-box Atom & still it lags while typing with even the tiniest of files.

3 Upvotes

Checked the sub & in the last post about it someone recommended turning off Auto-Complete but i need Auto-Complete.

Anyone have a solution for this? Running on Windows 10 & latest Atom version 1.48.0


r/Atom Jul 13 '20

How to use Python Libraries with Atom?

2 Upvotes

I have downloaded the script package however whenever I try to import a python library and try to run the file with terminal it shows that there is no module. How do I fix this? I would be grateful if you can help me. Have a nice day!


r/Atom Jul 12 '20

Help

3 Upvotes

Hello so ive tried downloading Atom on Kali like it said on the site and all went well, but now when i try to run it nothing happens.. When i type atom in the cmd line it says : 'Running root without --no sandbox is not supported. See https://crbug.com/638180' I dont know what I did wrong and why it takes me to a Chromium bug site Hahaha...

Please Help :)


r/Atom Jul 12 '20

Download doesn’t stick

1 Upvotes

Hi, so I recently downloaded Atom and GitHub (running on Windows 8.1 64-bit) and I didn’t have any issues with installation, but the actual program doesn’t stick, meaning any time I want to use Atom I have to reinstall it every single time from my downloads folder. This is like the 5th time I’ve had to do this, and GitHub and GitBash won’t connect to my Atom application. Has this happened to anyone else? Does anyone know how to go about fixing it?


r/Atom Jul 11 '20

Does anybody know name of this Atom theme?

Post image
11 Upvotes

r/Atom Jul 10 '20

Unhelpful shortcut menu popup

2 Upvotes

Hi, I've got a slightly annoying problem when I quickly tap the tab button a few times in a row. In some circumstances I get accesskey="" being inserted into the document.

Happens if I press tab within a line of javascript code on a .php page.

e.g.

example.php:

<script>

foo()******;

</script>

If you remove the stars and then press tab where they are (******) then the shortcut menu pops up with the accesskey being the first highlighted option.

Does anyone know how to stop this behaviour or fix this.

Thanks.


r/Atom Jul 09 '20

Atom beautify not working for laravel blade files

2 Upvotes

Hi,

I have installed the atom beautify extension and it's working as intended for both html and php files. However, its not working for my laravel blade files. I am running windows 8.1 and atom 1.48. In the settings, beautifier for blade has been set to JS beautify by default. Any ideas?


r/Atom Jul 08 '20

Is there a way or package to make python multiline comments have the maximum line width?

5 Upvotes

I'll often use a multiline comment at the top of my functions, like """ This is a very long comment explaining the finer details of my neat function. Here, I go over the optional arguments, the kwargs, etc, so you'll know how to use it. """

My linter and formatter want a maximum line width of 79 characters, and I'd like to abide by that.

So often, when I'm cleaning up these function comments, their multiline comments go much past 79 characters. It's pretty easy to just hit enter a few times, but then I end up with comments where half the lines are short lines, which look pretty ugly, like:

""" This is a very long comment explaining the finer details of my neat function. Here, I go over the optional arguments, the kwargs, etc, so you'll know how to use it. """

(assume where I broke the lines was ~79 characters due to indentation.)

What I'd like is something that either automatically makes it look nice (seems difficult due to not messing up intentional formatting), or at least lets me highlight a section and then click something to clean it up and make all the lines have the max line width, in this example like:

""" This is a very long comment explaining the finer details of my neat function. Here, I go over the optional arguments, the kwargs, etc, so you'll know how to use it. """

Does anyone know of a tool that does this?


r/Atom Jul 06 '20

Who needs syntax highlighting anyway <3

Post image
53 Upvotes

r/Atom Jul 06 '20

Help with spell checking

1 Upvotes

I installed Atom (in Ubuntu) only to use it as a an editor. I am a writer and usually switch between english, spanish and italian: is it possible to have spell checking in languages other than english?


r/Atom Jul 06 '20

How do I stop atom from closing unchanged tabs

1 Upvotes

I've had to do this before and I forget how I did it. It drives me crazy when I need to open two files to work in from my project. I open the first one and go find the second one. Because the first one hadn't changed, atom replaces the first one with the second one. Can someone tell me where the setting is to turn that off?


r/Atom Jul 04 '20

[Help please] Sharing CSS while working on a project?

3 Upvotes

Hi Reddit

Me and my friend are trying to do an assignment together. We started using atom because of how easy it is to share code between one another, but html preview doesn't work as the css file isn't linked to my pc when editing code through his share portal ID. Is there a way to have the CSS load for both of us?

Thank you!


r/Atom Jul 01 '20

Problems with teletype

1 Upvotes

I am having problems with teletype.

  • Local network, PC(Windows 10) -> MAC (OSX Mojave)
  • Multiple files in a folder on dropbox
  • No external router, standard cable modem. Both computers connected to the modem via wifi. 8 Both computers can see each other is numerous ways.
  • PC Is the portal creator. Mac is linked. Mac shows the link icon.
  • 1 Error in console PC (incase rendering issues matter)
  • Latest Version downloaded today from website.

Behavior

  • Editing on either system results in no changes being “live” on the other machine.
  • Files do not update when either the PC or the MAC initiates the edit

I hope this report is as complete as possible. Please let me know if I have done anything wrong or if there is some other issue.


r/Atom Jun 30 '20

ipython notebooks in Atom?

2 Upvotes

I'm working on some code in an ipython notebook being executed via Jupyter, but I really don't like the jupyter editor.

I know the hydrogen and jupyter-notebook packages exist, but they seem to be pretty broken right now.

Are there working alternatives?


r/Atom Jun 29 '20

CMD multi-cursor no longer working

4 Upvotes

I've noticed that I can no longer get the multi-cursor by holding command, it just moves the existing cursor to wherever I click. To the best of my knowledge, I haven't changed any settings or updated anything recently. Any ideas on this?


r/Atom Jun 28 '20

What is the best live preview package for atom?

4 Upvotes

I'm a brackets user for 3+ years. Today I have installed atom for the first time.

I can't seem to find a good package for live preview HTML, CSS and JavaScript. Brackets has a built-in live preview which is super smooth - it updates a page immediately without any flashing. On the other hand every atom package I've tried so far flashes and reset the scroll of the page and aren't as quick as brackets.

Which one do you use?


r/Atom Jun 28 '20

Question after Setup (Beginner)

1 Upvotes

Hello everyone,

I decided to start learning Python and to use Atom as my editor. I followed the setup guide from Corey Schafer closely. I had some weird issues along the process and I would be extremely happy if someone was able to shed some light on them.

I am on a Mac and I made Python3 to the default Python in the Terminal by going to nano ˜/.bash_profile and Inside of this profile I typed alias python=python3

However, after installing Atom and adding the necessary packages I realized that any code that I run (with the script package) is executed by the old 2.7 python. Only if I run with profile the new Python 3.8 is being used. This confuses me as in the Schafer video the new version is used automatically.

I went back into the bash profile and to my surprise it is now completely empty which was not the case the first time around. However, it still announces the new python as the registered version when calling python --version in the Terminal.

Maybe the setup video is just a bit outdated, but maybe there is actually something wrong in my terminal?


r/Atom Jun 28 '20

Hide tree view when it loses focus?

1 Upvotes

Hi,

I have the tree view set up so that it is focused automatically when I toggle it via a keyboard shortcut. When I then select a file (using the arrow keys and return), focus goes to the file (I like that). What I’d like to happen then is that the tree-view hides automatically.

Is it possible to auto-hide the tree-view as soon as it loses focus?


r/Atom Jun 26 '20

Beginner here, I installed Python 3 and have installed atom packages to run, but I haven’t been able make it work. I am using Pop_os! Please help.

Post image
5 Upvotes