How to run atom from a directory in windows - atom-editor

I want to open Atom editor from a directory like I do with VS code or git bash as shown in the image

For that you need to add atom to your system path.
To do that ,
1)Open the run dialog (win + r), type "SystemPropertiesAdvanced.exe" and hit enter. Here you should select "Environment Variables..." and edit the Path for your user.
2)Select and edit the variable path copy add this command C:\Users\<username>\AppData\Local\atom\bin in the the environment variable.
3)Now open your git bash in the desired directory and run atom.1 .

Related

How do you open an Rstudio project with a Git Bash command?

I am looking for a command to start an Rstudio project using Git Bash from the Git for Windows installation. I am looking for a command that opens the project in Rstudio, similarly to how it would open if you double-clicked on the .Rproj file in the Windows file explorer. I have Rscript.exe added to my PATH. Thanks!
You have to add "C:\Program Files\RStudio\bin" to your PATH. This will give you access to rstudio.exe. You may then run rstudio path-to-my-project.Rproj in the bash command line, and it will open as desired in OP.
Edit: If RStudio is the default program to open .Rproj files, you can run explorer path-to-my-project.Rproj, and this will also open the project as desired.
On MacOS you can use open, or on Linux xdg-open. E.g., open path/to/your-project.Rproj. See Connor's answer for Windows.

Why do you need to source .zshrc for every new shell in iTerm?

I've used Iterm2 with zsh everyday for the past 3 years, but I got a new computer and had to set it up again. The problem is that when I run ~/.zshrc it works fine, but I have to do it on every new terminal window I open. Not a good experience.
I noticed that I don't have any bashrc, bash_profile, or profile (dot)files on my new machine.
Here's the code in ~/.zshrc:
export ZSH=/Users/healy/.oh-my-zsh
plugins=(
git
)
ZSH_THEME="agnoster"
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
DEFAULT_USER=healy
Again, it works perfectly (and as expected), but only after I run the source command, and that shouldn't be the case.
Make sure your export/source are added after the plugins in your zshrc, as stated in this post:
oh-my-zsh config file not loading
On starting a new shell just run the command source ~/.zshrc by configuring in the
Preferences -> Profiles -> Select Default Profile(default profile will be starred) -> General -> Command -> Select Login Shell -> Send text at start:
Enter the value source ~/.zshrc.
You may add source ~/.zshrc; clear in case you need to clear the screen contents after executing the command.
I had the same issue and changing the Shells Open with option fixed this for me.
To get here:
Open Preferences for Terminal
Select the General Tab
Change Sells open with from Default login shell to Command (complete path) with the /bin/zsh in the input box.
Screeshot:
On 11.2.1 with Terminal 2.11, assuming you have already created .zshrc in your home directory, launch Terminal and select Terminal >> Preferences >> Profiles >> Shell
Under "Startup" check "Run command:" and input source ~/.zshrc
In my case, oh-my-zsh is not loaded because the line was comment out.
# IT'S WRONG! NEED TO UNCOMMENT
# export ZSH=/Users/$(whoami)/.oh-my-zsh
Though this question is not due to the same "comment out" obviously, I came to a conclusion that, if you need to source ~/.zshrc every time opening a shell instance, there should be some issue with your .zshrc,
and check oh-my-zsh and antigen(maybe) work fine.
for me,It works like this.
Profiles 》Open Profiles 》Select “Edit Profiles” 》Profiles 》General
and put "source ~/.zsh" into Send text at start textfield.

Open current folder

I recently reinstall ubuntu 16.04 and matlab. The problem is now, there is no "Open current folder' option available when I do the right-click in matlab. I have tried typing "filebrowser" in the command window but nothing happened. Besides, there is no "open/view outside matlab" option available for images. Thanks.
Typing filebrowser in command windows opens the 'current folder toolbar', or selects that if it is already open. If you aren't able to get the 'open current folder' option after right clicking in 'current folder toolbar' then there is the path to current folder shown above the command window, you can just visit that using regular system file browser/explorer, and if you do not have that address bar then just type 'pwd' without the quotes in command window and you get the current folder which you could visit using regular system file browser.

elm : install elm format extension

I have installed elm-format package (using amp install elm-format) and I want to run it from the command line , example elm-format mypage.elm
In order to run it from the command line it should be available in one of the environment path let's say usr/local/bin while the elm-format directory is installed in the following path Users/myuser/.atom/packages and none is available in env path
what should I move to the PATH (usr/local/bin) , is the whole folder or an executable file
note : when i run ls Users/myuser/.atom/packages/elm-format i get the followings :
CHANGELOG.md README.md keymaps menus src
LICENSE.md example lib package.json
I will answer my question since I have solved it.
first you have to install the elm-format binary file using your browser form the following URL
after installing the binary file extract it add the path to the environment path
for windows user add elm-format.exe or mac user add elm-format
since I am a mac user I used the below command to add it :
mv ~/Download/elm-format /usr/local/bin/elm-format
after installing the binary now we need to install elm-format extention for the appropriate editor
since I am using atom editor I have used the following command apm install elm -format
now we can used elm-format command line to format the elm page
command line : elm-format pagename.elm
According to npm website You could install elm-format by npm install -g elm-format.
For anyone using VS Code (on a Mac / Linux system):
1) Choose Download ZIP in the 'Clone or Download' dropdown on the elm-format Github repo.
2) To move the elm-format executable to your 'PATH', open the Terminal application and enter the following command:
mv ~/Downloads/elm-format /usr/local/bin/elm-format
3) Open VS Code and install the extension elm-format.
4) Still in VS Code, open User Settings. (Do this by pressing CMD + SHIFT + P to open the available commands search bar and type User Settings -- press enter. Alternatively, you can use the shortcut CMD + , to open the User Settings.)
5) In the file that shows up on the right side of the editor (your personal settings overrides), add the following line:
"elm-format.formatOnSave": true
Save.
Cheers!
For Atom configures: https://atom.io/packages/language-elm for Syntax highlighting and autocompletion, for auto format on saving https://atom.io/packages/elm-format
For the others IDE https://guide.elm-lang.org/install.html (VScode, Atom, Sublime, Vim,...)

Launching R gui from the command line and setting the working directory to the current folder

On a Mac, is there a way to launch the default R gui from the command line, with the working directory set to the current folder?
assuming R.app is in your Applications folder:
open -a /Applications/R.app .

Resources