atom-editor

Using git with ssh-agent on Windows

本小妞迷上赌 提交于 2019-11-29 00:38:48
问题 I'm on Windows. I installed git and posh-git (some helpers for Windows PowerShell). I can add keys with ssh-add and can authenticate with github and my webserver. I can also use git from the PowerShell to interact with my repositories. But there is one thing I can't do: I use git-plus for the Atom editor. And I don't get it to push to my repo. What is my problem? 回答1: posh-git and git for windows 2.7 should include everything you need to setup an ssh-agent. Once you have the module installed

How do I replace a newline in Atom?

空扰寡人 提交于 2019-11-28 18:38:50
In Atom, If I activate regex mode on the search-and-replace tool, it can find newlines as \n , but when I try to replace them, they're still there. Is there no way to replace a newline-spanning string in Atom? Looks like Atom matches newlines as \r\n but behaves inconsistently when replacing just the \n with nothing. So newlines seem to match \s+ and \r\n , and only "half" of the line-ending matches \n . If you replace \n with a string, nothing happens to the line-ending, but the string is appended to the next line If you replace \r with a string, nothing happens at all, but the cursor

Syntax Highlighting Guide for Atom

早过忘川 提交于 2019-11-28 17:36:48
I am very pleased with the new editor by Github. Unfortunately it isn't exactly easy to customize it. I wanted to create my own Syntax Highlighting Theme, because I am not happy with the ones available to download (at least they don't seem to do well with Java) Now the files (syntax-variables, color.less, etc.) to style seem to be in: ~/.atom/ .../packages (if you want to change existing themes) The problem is just that I don't know which (CSS) classes style which elements of the syntax. Is there a place where I can look up how to change the color of for example variable type declarations? Yes

How to config ESLint for React on Atom Editor

回眸只為那壹抹淺笑 提交于 2019-11-28 16:29:45
In Atom Editor I installed the following plugins linter linter-eslint It seems they don't recognize the JSX syntaxis. I have it working on the command line but had to use other plugins like esprima-fb and eslint-plugin-react . Looks like there are no such plugins for Atom Editor and would like to know if anyone of you knows a way to hack around this. To get Eslint working nicely with React.js: Install linter & linter-eslint plugins Run npm install eslint-plugin-react Add "plugins": ["react"] to your .eslintrc config file Add "ecmaFeatures": {"jsx": true} to your .eslintrc config file Here is

How can I jump to class/method definition in Atom text editor?

偶尔善良 提交于 2019-11-28 16:04:07
问题 Is there an easy way to do this? On Aptana I used Control +click and I wish there was a way to do something similar on Atom. 回答1: I had the same issue and atom-goto-definition (package name goto-definition) worked like charm for me. Please try once. You can download directly from Atom. This package is DEPRECATED. Please check it in Github. 回答2: I believe the problem with "go to" packages is that they would work diferently for each language. If you use Javascript js-hyperclick and hyperclick

How to auto-indent code in the Atom editor?

本小妞迷上赌 提交于 2019-11-28 14:57:33
How do you auto-indent your code in the Atom editor? In other editors you can usually select some code and auto-indent it. Is there a keyboard shortcut as well? Nacho L. I found the option in the menu, under Edit > Lines > Auto Indent. It doesn't seem to have a default keymap bound. You could try to add a key mapping (Atom > Open Your Keymap [on Windows: File > Settings > Keybindings > "your keymap file"]) like this one: 'atom-text-editor': 'cmd-alt-l': 'editor:auto-indent' It worked for me :) For Windows: 'atom-text-editor': 'ctrl-alt-l': 'editor:auto-indent' The accepted answer works, but

Why python's versions differ when called from Terminal and from Atom

旧巷老猫 提交于 2019-11-28 14:47:23
When I run Python from the terminal and from Atom , different versions of python are called. As a consequence, there are packages that I can call without problems from the terminal but that I cannot call from Atom . Here are the details: When calling python from the terminal , I get version 3.7.1 $ python Python 3.7.1 | packaged by conda-forge | (default, Nov 13 2018, 09:50:42) [Clang 9.0.0 (clang-900.0.37)] :: Anaconda custom (64-bit) on darwin (I get exactly the same if I type python3 instead) Now when looking at the python version from Atom i get version 3.6.5 with >>> import sys >>> print

Running Python from Atom

跟風遠走 提交于 2019-11-28 05:36:45
In Sublime, we have an easy and convent way to run Python or almost any language for that matter using ⌘ + b (or ctrl + b ) Where the code will run in a small window below the source code and can easily be closed with the escape key when no longer needed. Is there a way to replicate this functionally with Github's atom editor? The script package does exactly what you're looking for: https://atom.io/packages/script The package's documentation also contains the key mappings, which you can easily customize. Download and Install package here: https://atom.io/packages/script To execute the python

Atom text editor remove trailing whitespace on save

ぐ巨炮叔叔 提交于 2019-11-28 04:14:38
I use Sublime text . Now I am trying Atom . When I save any file in sublime text it does not include any trailing blank line. But saving any file in Atom leaves a trailing blank line. How do I force Atom not to leave trailing white spaces? Under your Atom Preferences go to Packages tab and search for whitespace . Click on the whitespace package and uncheck Ensure Single Trailing Newline option On global level this can be changed using settings in Whitespace package, but if you want to disable it for a specific language you have to use syntax-scoped properties in your config.cson. '.text.html

How to integrate Protractor test cases in Atom using Typescript?

可紊 提交于 2019-11-28 02:09:32
问题 I have installed typescript for atom for writing Protractor Scripts For automation. My code is written in Jasmine Framework as protractor supports it nicely. I wrote in this structure. describe('Sign in',function(){ it ('Verify Modules Present', function(){ loginPage.enterUsernameAndPasswordWithSignIn('a','b'); browser.sleep(3000); var module = element(by.xpath("//*[@ng-reflect-router-link='My']")); browser.wait(protractor.ExpectedConditions.elementToBeClickable(module), 8000).thenCatch