How to run a program in Atom Editor? - text-editor

I found Atom editor as good free alternative to Sublime text editor. Not able to find a straightforward way to run a program in Atom editor. In my case, I am trying to run a java program. Please let me know if it's possible? If yes, please describe the steps to follow.

I find the Script package useful for this. You can download it here.
Once installed you can run scripts in many languages directly from Atom using cmd-i on Mac or shift-ctrl-b on Windows or Linux.

Click on Packages --> Commmand Palette --> Select Toggle.
Type Install Packages and Themes.
Search for Script and then install it.
Press Command + I to run the code (on Mac)

You can go settings, select packages and type atom-runner there if your browser can't open this link.
To run your code do Alt+R if you're using Windows in Atom.

For C/C++ programs there's very good package gpp-compiler.
Shortcuts:
To compile and run: F5
To debug: F6

If you know how to launch your program from the command line then you can run it from the platformio-ide-terminal package's terminal. See platformio-ide-terminal provides an embedded terminal within the Atom text editor. So you can issue commands, including commands to run your Java program, from within it. To install this package you can use APM with the command:
$ apm install platformio-ide-terminal --no-confirm
Alternatively, you can install it from the command palette with:
Pressing Ctrl+Shift+P. I am assuming this is the appropriate keyboard shortcut for your platform, as you have dealt ith questions about Ubuntu in the past.
Type Install Packages and Themes.
Search for the platformio-ide-terminal.
Install it.

This package in Atom can run scripts.
Atom script package
press Alt+X for the running script.
For running javascript you need to install 'node js'
Also pressing ctrl+shift+i in atom gives developer option like chrome
you can test javascript code side by side in atom editor.

In order to get this working properly on Windows, you need to manually set the path to the JDK (...\jdk1.x.x_xx\bin) in the system environment variables.

You can try to use the runner in atom
Hit Ctrl+R (Alt+R on Win/Linux) to launch the runner for the active window.
Hit Ctrl+Shift+R (Alt+Shift+R on Win/Linux) to run the currently selected text in the active window.
Hit Ctrl+Shift+C to kill a currently running process.
Hit Escape to close the runner window

You can run specific lines of script by highlighting them and clicking shift + ctrl + b
You can also use command line by going to the root folder and writing:
$ node nameOfFile.js

Related

How can I launch gitahed from terminal?

I enjoy using gitahed, and I would like to add a shortcut to lauch it, with github desktop I use github-desktop, but I can do the same with GA?
How can I launch gitahed from terminal?
GitAhead has a Terminal panel at Tools->Options. It has a button to install command line tools. It really just creates a symlink to the GitAhead binary in /usr/local/bin. If that doesn't work for some reason, you can create the symlink yourself or an alias. See command line options by running with the --help flag. There are only a few at the moment.

Terminal doesn't open window on top Mac - Atom

I am currently using Atom to code in Python3 on my Mac and I have a package installed ("atom-python-run") which launches a terminal window with the command "python3 {path}" with 'path' being the current working directory with filename.py included. It opens just fine and runs perfectly, but the window doesn't open on top of my atom window but behind it instead. I have to click it every time to see the terminal window and it's really frustrating. I also hate using CMD+Tab to find it as well.
This is a bug in the package I'm using (I think) and I don't want to wait for them to fix it. Are there any methods in OS X to ALWAYS open Terminal on top of every other window? Or a third-party application? I can't find a solution to this problem anywhere online.
If you install the scripts package and use it, the output will be written to a window in the Atom application and will be shown at completion. Go to the Atom package page and search for the word script. You should get a hit on the "script" package. Install this package by just clicking on the install button and then open Atom and the python script you wish to run. Now in Atom go to the packages menu item and from that menu select "script". You'll be given several options, choose "run script" and your script should run showing the output in a window at the bottom of the Atom window.

How to configure Atom script to run main.py

I recently started used Atom IDE. It feels good. The only thing that I find difficult is to setup a project profile to run. In pycharm there is Run configuration, is there something similar to it in Atom ?
I have a project with multiple classes. When ever I want to run my script,I have to go to the main.py to launch 'ctrl + i'.
Could any one help me to setup the project in a such a way, when I execute 'ctrl + i' it automatically launch's main.py instead of the py file I am calling from.
In order to run a python script in tha Atom IDE, you can either press Ctrl+Shift+B or install a package called "terminal-tab" (https://atom.io/packages/terminal-tab). This package in an integrated command prompt like cmd on windows.
In the top bar, under "packages", go to "script", and select "configure script".
There put in the directory in which the program is, what command to run (python3 main.py), and select "save as profile." The window explains itself.
Then, you should be able to run from that profile with Alt+Ctrl+Shift+B, from whatever tab you're on.

How to get a node or cmd terminal in sublime?

Is there a way to run npm commands from Sublime?
For instance, if I wanted to run npm install angular-ui-grid on the current folder in Sublime, how would I do that?
I've looked at posts that say I can build with Node in Sublime, but I don't think that means I can run npm install as if I was in a terminal.
I know you can run a Python terminal from Sublime with Ctrl+`, and you can open a command window at the current location, but is there any way to combine the two?
NOTE: Looking for a Windows cmd or powershell terminal.
I guess, you are looking for TerminalView
This is a Linux/macOS plugin for Sublime Text 3 that allows for terminals inside editor views. The plugin uses a pseudo-terminal to start the underlying shell which means it supports
Interactive applications
Auto-completion
Terminal shortcuts (ctrl+c, etc.)
Password prompt etc.
You can get this package here,
https://packagecontrol.io/packages/TerminalView
Hope this helps!

silent mode installation of setup files in Windows server

I want to install some softwares such as notepad++, safari etc in silent mode using command prompt. And my OS is win2k8r2.
I placed two executables npp.6.3.3.Installer.exe and SafariStup 4.2.exe in a folder in c drive and used command line arguments as below..
c:\AllFiles>npp.6.3.3.Installer.exe -s
it executes, but shows dialog boxes that was not expected.Please help...
Each program is going to be different, some don't even support silent installations. From command line if you do yourfile.exe /? it should tell you available options.
For Notepad++, I recommend simply downloading the ZIP package (not the EXE installer), unpacking it to the desired location, and adding a Start Menu shortcut.
You don't need to install it per se.

Resources