atom-editor

How to link one html page to another one in another folder

江枫思渺然 提交于 2019-12-01 14:46:30
Can't link the page "index2.html"0 from the "rock-paper-scissors-game2" folder to "index.html" in the "digital-clock" folder. Not sure if the code is wrong or something else. I'm using Atom by the way, and I don't know what else to try because the code for the link looks correct. <a href="rock-paper-scissors-game2/index2.html"> Game </a> And when I run it in chrome it gives the file not found error. Your file was not found It may have been moved or deleted. ERR_FILE_NOT_FOUND To link to another file WITHIN your web site structure, you should use relative references . Relative means, relative

How to link one html page to another one in another folder

丶灬走出姿态 提交于 2019-12-01 13:26:31
问题 Can't link the page "index2.html"0 from the "rock-paper-scissors-game2" folder to "index.html" in the "digital-clock" folder. Not sure if the code is wrong or something else. I'm using Atom by the way, and I don't know what else to try because the code for the link looks correct. <a href="rock-paper-scissors-game2/index2.html"> Game </a> And when I run it in chrome it gives the file not found error. Your file was not found It may have been moved or deleted. ERR_FILE_NOT_FOUND 回答1: To link to

How to fix “NotImplementedError” when trying to run Hydrogen in Atom

家住魔仙堡 提交于 2019-12-01 11:55:15
问题 I am trying to run Hydrogen on Atom, but I am getting an error message that ends with "NotImplementedError" in the asyncio python lib. I have Python3 installed on a Windows 10 machine, and I have the ipython kernel installed with jupyter. I am getting the following error message, and I am not sure where to start to fix the problem. Traceback (most recent call last): File "C:\Users\chels\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 192, in _run_module_as_main return _run_code

Auto-save in Atom Editor

久未见 提交于 2019-12-01 02:02:58
Some code editors, such as WebStorm, have an option to auto-save when the editor loses focus. I've searched for an option like this in the Atom Editor but haven't found anything yet. Does the Atom Editor have a setting that allows for auto-save of edited files when it loses focus? If so, where can this be set? If not, how would one go about writing a plug-in that does that? Yes there is auto save package . You can enable autosave in package settings. autosave-onchange much better alternative! https://atom.io/packages/autosave-onchange There's also the save-session plugin which makes Atom

pygame.error: Couldn't open image

孤人 提交于 2019-12-01 00:46:31
I am learning python using this website: http://programarcadegames.com/index.php?lang=en&chapter=bitmapped_graphics_and_sound I am trying to load an image like so: background_image = pygame.image.load("background.jpg").convert() I have found several other asking the same question, and all the answers are telling the poster to make sure the image is in the same folder as the .py file. Well, it is. I double checked. I also tried putting it into a subfolder called 'images' and using this. background_image = pygame.image.load(os.path.join("images","background.jpg")).convert() In both cases I get

How to install shell commands in Atom to enable the atom command?

五迷三道 提交于 2019-12-01 00:02:54
问题 Could someone please tell me how to install the shell commands for Atom to enable the atom command in the command line? 回答1: According to the Atom Flight Manual, they should be installed when you run Atom for the first time. When you first open Atom, it will try to install the atom and apm commands for use in the terminal. In some cases, Atom might not be able to install these commands because it needs an administrator password. To check if Atom was able to install the atom command, for

Atom - Force Tab Width 2

旧城冷巷雨未停 提交于 2019-11-30 14:00:22
问题 I just switched from Sublime Text to Atom in order to turn completely open source. I have trouble with something very very simple: I want Atom to use always (!) and under any circumstances tab width 2 and replace tab with spaces. This setting is so simple in gedit or Sublime Text, but no matter what I am trying: When I start a new file, tab size is 2 (good!). When I use an existing file, tab size is sometimes 4. I find that a bit annoying. My current setting in Editor are seen in the

How do I write a custom command in Atom?

耗尽温柔 提交于 2019-11-30 10:38:18
问题 I want to write a command for Atom that composes two or more pre-existing commands, like "Select Line" and then "Cut". How do I do that? 回答1: You can add the following code to your init.coffee file: atom.commands.add 'atom-text-editor', 'custom:cut-line', -> editor = atom.workspace.getActiveTextEditor() editor.selectLinesContainingCursors() editor.cutSelectedText() You can get the code to execute from the source by searching for strings in the command palette. And once you have a command

Is there a command for formatting html in the Atom.io editor?

China☆狼群 提交于 2019-11-30 10:17:39
问题 I would like to format my html with a command, like i do in visual studio, using CTRL-K-D. Is this possible in atom.io? If not, are there other options? 回答1: Atom does not have a built-in command for formatting html. However, you can install the atom-beautify package to get this behavior. Press CTRL + SHFT + P to bring up the command palette ( CMD + SHFT + P on a Mac). Type Install Packages to bring up the package manager. Type beautify into the search box. Choose atom-beautify or one of the

Atom Editor: multiple snippets

只愿长相守 提交于 2019-11-30 08:15:17
This is such a simple question but I can't find any documentation besides the readme. How can I have multiple custom snippets in Atom Editior: For example I have this in my snippets.cson right now '.source.js': 'Normal Comment Block': 'prefix': 'cmm' 'body': """ //********************************************************************************** // //********************************************************************************** """ '.source.js': 'Dashed Comment Block': 'prefix': 'c--' 'body': """ //---------------------------------------------------------------------------------- // //----