I just moved from Sublime text to Atom. I am using Java for source code and Script Package to run the code. I am unable to take input from User. Is there a possible way to do that?
Atom is generally a text editor. It does not support build and execution of code.
For taking user input you can try the platformio-ide-terminal package.
Install 'atom-python-run' if your code is for python.
And press F5 to take input after you installed the package.
Related
Occasionally I had not saved my source script, and its old version opened. I can find the new version which was executed during the previous session, but only like shreds: I search in history and it shows me a piece of code, but not all lines though they were executed simultaneously. Is there any way to access the complete history, which is definitely stored somewhere, but not shown as a whole? Thanks!
I am using R version 3.6.2 and RStudio Version 1.2.5033.
Search for the "history_database" file. It is an ASCII file and it is usually stored in the folder
C:\Users\username\AppData\Local\RStudio-Desktop
Please, take a look at: https://support.rstudio.com/hc/en-us/articles/200526217-Command-History
use shortcut key Ctrl + 4 to put focus on history or Ctrl+Shift+4 to enlarge window of history. Let us know
I use the atom-runner package, which runs scripts when I click alt+x:
Now, I also installed the gpp-compiler package, which runs c++ files when I click F5:
It is confusing to have two different key-bindings for running. I would like to use alt+x both for gpp-compiler and for atom-runner, based on the file: if it's a c/c++ file then run gpp-compiler, otherwise run atom-runner.
Is this possible?
You are in luck. I was doing something similar to this recently and thought that this could be done.
I've made an Atom package to do what you're looking for. You can find it at https://atom.io/packages/multi-hotkey. The default hotkey is Ctrl-M.
Currently only one hotkey is possible, but with customization available for four different user-inputted file extensions and corresponding commands, and a final command for anything not matching the preceding extensions.
I run phpunit quite often after changing code.
And, it is always hard for me to run phpunit by clicking right button of mouse and select run phpunit.
Is there a quicker way to run it?
Thanks in advance.
You need to create what is called a Build System - this way you can hit ⌘ + B (or Ctrl on windows) and it will run it.
Something like this will do:
https://gist.github.com/baghayi/4534089
Read the docs on how to customize the build system
Anyone know how to set Notepad++ as default text editor for SAS, Stata and R?
I'm having the hardest time finding anything online (particularly for SAS). Looking for ability to run code from Notepad++ as well as setup color coding.
Thanks.
Why not just go the GUI route: right click, e.g., any foo.R file and select "Open with...", then pick Np++ and click the "always open this file type.." button. Rinse, lather, repeat.
BTW, for R, if you don't already have it, get "NppToR" , a little app which lets you execute code directly from the Npp window.
On windows you can either:
manually edit the keys for the file type to set the value of HKEY_CLASSES_ROOT\FILE_TYPE\shell\edit\command where FILE_TYPE is the appropriate one for each of the files extensions you wish to change this is quite hard work or
you can use a program that does it for you such as the free Default Programs Editor
In either case the first thing to do is to back up the registry.
I would seriously suggest looking into using one of the many, some free IDEs as they will automatically include the run from edit environment, syntax highlighting, code completion and, in many cases, debugging as well.
Notepad++ is my favorite editor and I was in the same shoes as you are now.
I am assuming that you are in Windows (Notepad ++ doesn't exist in Mac, saddest thing for me)
Please follow the steps mentioned in the below webpage and do as the author says.
http://hafniumcity.com/notepad_color.php
Now for in-line editing , it may be not be the best choice for SAS. Although I haven't tried it much so not a good person to comment on it.
Under R, is there a way to list all of the commands that have previously been typed?
Yes there is.
history(max.show=Inf)
IDEs for R often support this feature in a panel. RStudio, for instance, has a history tab from which you can send a previous command to the console or to your source file with a click. I believe others are similar functionality as well.