Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Opening Pycharm from terminal with the current path

If you give in the command "atom ." in the terminal, the Atom editor opens the current folder and I am ready to code.

I am trying to achieve the same with Pycharm using Ubuntu: get the current directory and open it with Pycharm as a project.

Is there way to achieve this by setting a bash alias?

like image 217
handris Avatar asked Sep 14 '16 22:09

handris


People also ask

How do I open the current directory in PyCharm?

You can find the executable for running PyCharm in the installation directory under bin. To use this executable as the command-line launcher, add it to your system PATH as described in Command-line interface. By default, PyCharm does not provide a command-line launcher.

How do I access PyCharm from terminal?

From the main menu, select View | Tool Windows | Terminal or press Alt+F12 .


4 Answers

open -na "PyCharm CE.app" . 

worked for me in MacOS & PyCharm Community edition

like image 169
Anandkumar Avatar answered Sep 25 '22 01:09

Anandkumar


PyCharm can be launched using the charm command line tool (which can be installed while getting started with PyCharm the first time).

charm .

like image 17
masnun Avatar answered Oct 10 '22 08:10

masnun


This worked for me:

pycharm-community .
like image 12
Ashik Avatar answered Oct 10 '22 09:10

Ashik


This works for me:

alias atom_pycharm='~/pycharm/bin/pycharm.sh .'

Maybe you installed it to a different path, though - locate your pycharm.sh file and modify accordingly.

You have the usual bash tricks: if you want to run in the background, append an &, redirect stdout/stderr where you want etc.

like image 3
wim Avatar answered Oct 10 '22 08:10

wim