Run npm start in Atom Text Editor - atom-editor

In Atom text editor, after saving a file, I'd like to have a hotkey like ctrl-alt-b that will run "npm build" and display the results in an embedded terminal.
I'm also hoping that after seeing the terminal output, I'd be able to click anywhere outside that embedded terminal to make it go away, (instead of having to mouse-travel to some small exit button and click it).
It may be relevant to mention that my OS is Ubuntu 16.04.5.
I did find a really nice tool called the atom build package, but it seems to take over the whole build process, which is something I've already got setup via "npm build".

Setting up a hotkey is the trivial part, but you need some package that provides the actual build command. You can add something like the following to your Atom keymap:
'atom-workspace atom-text-editor:not([mini])':
'ctrl-alt-b': 'package-name:command-name'
Other than that, I recommend using a general purpose package like process-palette. It lets you define a command (or a chain of commands) and run it in your project directory at the press of a custom hotkey.

Related

How to run qt-creator project with 'sudo nice x' prefixes?

So i have a C program that i made a while back that im going to remake in qt with additional features.
Typically how i ran the program is I open the terminal, navigate to the project folder, and use the command
$ sudo nice --10 ./myprogram
That is not the case anymore, since i am using qt-creator i now just simply click the 'run' button and the program starts. My program works best when it has elevated scheduler priority hence the nice --10.
How do i modify my qt-creator project to run my program with the sudo nice --10 command?
To do that go to
Tools-> Options-> Environment -> System Tab under the terminal option write "/usr/bin/xterm sudo nice --10"
Also if you have not done it already go to Projects -> Build & Run -> Run and check the box Run in terminal.
I never tried, but in the config of your project you can add a user defined executable to be executed.
Maybe creator allows for a shellscript, than you can simply put your sudo nice --10 in a shellscript, or you write a little program which gets a program path as parameter and starts it with the elevated scheduler priority (guess there is a user api in linux for that...)

Running a Python file with atom

I'm using atom for 2 months to run Julia files and it works.
I would like to run some python files too
To do that, I installed the IDE-python package
When Atom is started, there is the following picture:
I can run a Julia file without problem, but I can't run a python file (and there is not a python console...)
How can I add it and run the python file ?
You should load the Script module into Atom. Once loaded, it will show up under the packages menu or you can use the command-I keystroke to run your python code.
To use a shell to run python install the module platformio-ide-terminal. When you click this under packages you'll get an option to toggle a terminal window. It will show up in the bottom third of Atom window.

ConEmu + zsh: how will keyboard shortcuts and other shell features work?

I'm trying to wrap my head around this: on Windows, I use cmder (a wrapper around ConEmu) which improves on the bare cmd.exe experience (a lot) but can also host other shells like PowerShell or Git Bash. I'd like to go more "unix-y" but still well integrated with my Windows tools. Git Bash strikes the right balance for me: I can do things like rm -rf node_modules but still run my Windows commands fine.
It's easy to get Git Bash going inside cmder, however, I'd like to replace the shell with zhs, mainly to get the super-useful "up arrow respects the current prefix" feature (I write git, press the up arrow and only get suggestions on the recent Git commands).
The question is, who will handle the up arrow? Will it be ConEmu and do Windows-y stuff (cycling through all the commands) or will it fall down to zsh and the cycling will be implemented by it? How does this work?
Related: ConEmu: possible to change the up arrow behavior?
ConEmu's disclaimer states
ConEmu is not a shell, so it does not provide "shell features" like remote access, tab-completion, command history and others.
Only the shell itself knows when user types a command and only the shell may store executed commands history. Of course, only the shell may process Up/Down/Tab keys to "browse" stored history of commands.
cmder is a bundle of tools including clink, which integrates into cmd.exe and process cmd's prompt internally. So, in cmder by default Up/Down/Tab arrows are processed by clink.
More info is here: http://conemu.github.io/en/TabCompletion.html

Running a python .py file on Jetbrain Pycharm

I write my .py files using Pycharm JetBrains editors. When I run my codes, the output is shown in a console entitled "Run", without any prompt. Therefore, I dont have access to the variables of my code output. How can I force the pycharm to show the output of my codes in ipython console?
You can edit the Run Configuration and check the box "Show command line afterwards". This will run your script, but leave you in an interactive prompt. Everything from your script will have been imported and available.
As a note, if you install the IPython package (Preferences -> Project -> Project Interpreter, click + to add packages) then you can get a nicer console interpreter.
Finally, a different way to accomplish what you are looking for: run under Debug rather than Run. You can set a breakpoint and then use the debugger's Console right at the line you might be interested in.

Building Brackets Shell (After running the grunt build command)

On windows after running the grunt build command for creating brackets shell it gives done without errors but i dont see any .exe file generated..
What might be the problem???
Here are some possible solutions:
Are you following the full brackets-shell build instructions, including all prerequisites?
Make sure Brackets isn't running at the same time. The build will fail silently if the .exe file is currently in use (see bug).
Try with a fresh git clone of the repo. If your brackets-shell local copy has been around for a while, sometimes the build & deps folders can get in a bad state. (I'm assuming you haven't modified the source at all. If you have, try with an unmodified copy of the source first to make sure it builds correctly without any of your changes).
Check that python --version shows 2.7.x
Verbose build output would also be helpful in diagnosing issues like this, but unfortunately there's not yet an easy way to get that...
If you follow the instructions on bracket-shell's wiki page, the Windows executable should be created in the Release directory.

Resources