atom-editor

Keyboard shortcut to convert selection to uppercase (or lowercase) in the atom editor

时光总嘲笑我的痴心妄想 提交于 2019-12-02 14:34:25
What is the keyboard shortcut to convert the currently selected text to uppercase (or lowercase) in the Atom editor? martin jakubik On Windows and Linux: Ctrl + K then Ctrl + U for uppercase Ctrl + K then Ctrl + L for lowercase On Mac: Cmd + K then Cmd + U for uppercase Cmd + K then Cmd + L for lowercase For Windows OS For Uppercase CTRL + K + U For Lowercase CTRL + K + L 来源: https://stackoverflow.com/questions/38790154/keyboard-shortcut-to-convert-selection-to-uppercase-or-lowercase-in-the-atom-e

How to save Atom editor config and list of packages installed

独自空忆成欢 提交于 2019-12-02 14:14:09
I have recently started using Atom editor. Its pretty great so far. I am planning to install it on several other machines. How can I replicate the config and list of packages installed on my current machine to other machines. Is there a config that I can use to export and import them on other machines. Use Git to version control your config file ( ~/.atom/config.cson ), and any other config files (dotfiles) you may have. You can then host your Git repository for free on somewhere like GitHub , and retrieve it on other computers simply by running git clone https://github.com/{username}/{repo} .

git commit command with core.editor equals atom

允我心安 提交于 2019-12-02 11:53:17
问题 I have a problem with atom editor. I set atom as the core.editor by command: git config --global core.editor atom But when I try to commit the changes to a repository in git by git commit command, I expects that the editor of my choice will open and prompt for the commit message but before it opens git throws an error Aborting commit due to empty commit message. after it it opens the editor and when I enter the commit message and quits the editor no commit occurs, I know I can use command git

Snippet Variables?

耗尽温柔 提交于 2019-12-02 10:46:58
Is there any way that we can create snippets in Atom with variables (someway like Emmet did in HTML)? Here's an example that we want to achieve: From: p4 To: padding: 4% 4% 4% 4% ( From: p[i] to padding: i% i% i% i% ) (the user input p+[i] , i is variable ) To my knowledge you are not able to do that with Atom snippets because they are composed with just CSON (i.e. no scripting). So while you can't do that you can use a single variable and expand it into multiple locations in your snippet, something I learned in this blog that I read here Taken from that post, here is example CSON to do that:

Disable warnings (ids selector) in linter-csslint on Atom?

折月煮酒 提交于 2019-12-02 09:50:54
How to disable warnings in linter-csslint on Atom like iDs selector warning You can create a .csslintrc file in your project's directory as specified here . Inside the file, you can add this: { "ignore": [ "ids" ] } You can see the full list of rules here . 来源: https://stackoverflow.com/questions/44875427/disable-warnings-ids-selector-in-linter-csslint-on-atom

git commit command with core.editor equals atom

好久不见. 提交于 2019-12-02 08:19:02
I have a problem with atom editor. I set atom as the core.editor by command: git config --global core.editor atom But when I try to commit the changes to a repository in git by git commit command, I expects that the editor of my choice will open and prompt for the commit message but before it opens git throws an error Aborting commit due to empty commit message. after it it opens the editor and when I enter the commit message and quits the editor no commit occurs, I know I can use command git commit -m '<message>' but I want to know why this error occurs and how to solve it. try with: git

How to automatically enter brackets on autocomplete?

人盡茶涼 提交于 2019-12-02 08:06:39
Whenever I use the autocomplete for atom it doesn't include the brackets. For example if i start typing "print" I hit enter and it enters print but doesn't include the brackets. The default Python snippets only supports the print keyword, not the print() function. Since I haven't found another package that does, you're problably best off adding a snippet (Atom > Open Your Snippets) such as: '.source.python': 'print()': 'prefix': 'print-function' 'body': 'print($1)' The prefix will trigger the snippet defined in the body, in case prefer to call it differently. 来源: https://stackoverflow.com

Pass arguments to packaged electron application

南笙酒味 提交于 2019-12-01 19:57:49
We're using electron-packager to bundle up and distribute the front-end of our web application. We need to be able to pass in the host and port of the server to the electron front-end for connecting. When we launch via electron main.js --host blah --port 8080 it works. Once it's packaged, we run via ./MyApp --host blah --port 8080 and it doesn't work. This is bad because we don't want customers to need to install electron/npm itself. Also worth noting is that this happens whether we package the app in an asar archive or not. Any ideas on things we could try, or if we're trying to go about this

Using atom as a git editor fails to wait for commit message, why?

浪子不回头ぞ 提交于 2019-12-01 19:00:00
I have configured my git editor both by: git config --global core.editor "atom --wait" or git config --global core.editor "atom -w" based on some posts in StackOverflow. And my .gitconfig file has oneline like: editor = atom -w or: editor = atom --wait However, when I tried to use git commit, the git aborted commit due to empty commit message. After that, Atom launched after that. If I typed in commit message, save and quit. The message in bash is: Attempting to call a function in a renderer window that has been closed or released. Function provided here: Object. Remote event names: destroyed,

atom editor indentation error with Python

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 15:34:24
问题 I am new to atom, so I opened my existing code using atom and modified few lines, then when I tried running the code with python, I get the following error: IndentationError: unindent does not match any outer indentation level I realized that Atom editor does indent my code differently to what I had. refer to the attached picture below showing the different indentation styles. line 1300 is the old indentation and 1301 is the one created by Atom How can I fix this without modifying my 1000+