PhpStorm: open a project/folder with command in current version - command-line

I've used the command phpstorm [path] to open a project/folder with PhpStorm.
After the update from 2018.2 to 2018.3 the command opens every project/folder with the older version 2018.2
How can I fix it, that the command opens the current version?

Tools > Create Command-line Launcher… from within the current version and then just overwrite it.

Related

Import fuctions not working on PyCharm and I can't figure out why from other questions, what may be going wrong? [duplicate]

My PyCharm installation has two interpreters available:
Python 3.3.2 (/usr/bin/python3.3m)
Python 2.7.5 (/usr/bin/python2.7)
Whenever I open a new project it sets the interpreter to Python 3. Since I work mostly with 2.7, this means in most cases I have to reconfigure it. How do I change it to use 2.7 by default for new projects?
Update: After setting the default interpreter to Python 2.7.5 in File → Default Settings → Project Interpreter and removing the .idea/misc.xml file, the interpreter is now not set at all in misc.xml. Better than setting it to Python 3.3, but still...
File | New Projects Setup | Settings for New Projects | Project Interpreter.
This configuration sets the default interpreter for the new projects, note the Settings for New Projects menu, it's not the same as File | Settings which sets options for the current project.
If there is no open project, you can access this menu from the Welcome Screen (Customize | All settings):
This has now changed in the newer versions of PyCharm (I've got 2018.2). It's now called Preferences for New Projects:
New PyCharm versions in Windows have moved the New Project Settings to a new location. See image.Full navigation: File > Other Settings > Settings for New Projects > Project Interpreter.
I am using a Mac and I found that on the splash screen there were messages saying that one of the xml files in
/Library/Preferences/PyCharm2017.3/options/
could not be loaded. As a result a new one was created. When I looked at the files in this directory I found a number of the files were corrupted in some way and could not be viewed. I renamed all these to .OLD, restarted PyCharm and reset the defaults to the system interpreter in my case. This fixed my problem and PyCharm now defaults to the system interpreter.
This has now changed again on the latest version of PyCharm. It is now
File > New Project Settings > Settings for New Projects
Screenshot
if you want a default configuration, right click on the text and click run, this way it will automatically create a configuration for you.
In PyCharm Professional version 2022.1 in Linux the setting is now in
File -> New Projects Setup -> Settings for New Projects....
Then in appeared window you can select needed interpreter.
However, when I create a new project, PyCharm still creates it with python 3.6 for some reason.

How to make PyCharm work with the Go plugin?

I am using PyCharm 3.1.1 and I have installed the Go plugin for IntelliJ Idea. I did export GOROOT=$(go env GOROOT) to prevent PyCharm from complaining about missing GOROOT environment variable.
Now I was able to create a sample project, but the run command complains:
Error running untitled1.go: No Go Sdk defined for this project
On other sites I found that I should do something like:
Go to the File -> Project Structure and configure Go SDK by clicking + button and
selecting /usr/lib/go/ folder.
But I don't have File -> Project Structure menu item.
How to make PyCharm work with the Go plugin?
You can get most of the way there with External Tools. There is no way to replace the 'Run' button until the next version of the plug-in, per Issue #728.
To set up your external tools, go to PyCharm -> Preferences (command+,) -> Tools -> External Tools -> +
Fill in the form:
Hit OK. Use it from the menus:
Please use the latest release from Github releases https://github.com/go-lang-plugin-org/go-lang-idea-plugin/releases. It supports PyCharm 4.0.5+.
You can achieve it now with a Version 2016.1 or higher. I will give a complete guide, so the first steps would not be relevant for you. Also I write it using MacOS, so some names might be different. Go to
Preferences -> Plugins -> Browse Repositories -> Manage repositories and insert https://plugins.jetbrains.com/plugins/alpha/5047 which is the plugin behind this repo (maintained by IntelliJ). Install that plugin.
After plugin is installed, create a .go file. When you open it you will see a popup go project sdk is not defined. Click on it and select your /usr/local/go path.
A couple of helpful links:
go plugin documentation
how to set up go plugin
If you are an IntelliJ fan, you can edit and run Go using goland editor (Notice, this is not a Go plugin added to PyCharm but a different editor).
For installation on Ubontu:
sudo snap install goland --classic , or visit there website https://www.jetbrains.com/help/go/install-and-set-up-product.html
If you're running on OS X, you'll have to use the launchctl setenv command to set the GOROOT environment variable, so it's available system wide, which includes launching applications via the GUI
launchctl setenv GOROOT $(go env GOROOT)
To check it's set
launchctl getenv GOROOT
For the values to persist across reboots, you'll need to edit (or create) /etc/launchd.conf:
setenv GOROOT [path]
See this answer for more information of the format of this file. Note that you won't be able to call $(go env GOROOT) within launchd.conf

Eclipse --launcher.openFile does not open the file

I have been trying to open a file from the command line in a running Eclipse session. Based on the documentation, I should be able to do
eclipse --launcher.openFile myfilename
However, when I do this, there is a long pause, and then Eclipse tries to launch a new session. It gives me an error message that the workspace is not available, and then wants me to choose a new workspace.
How do I open a file in the currently running Eclipse session, from the commandline?
As of Eclipse Helios (3.6) you don't need special command-line parameters to open files from the OS file explorer or command line (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=4922). I think you should be able to just do eclipse myfile.java (as long as you have associated .java files with Eclipse).

Is it possible to add external command line tools to Netbeans?

Is it possible to use external command line tools in Netbeans?
Thank you.
After searching and searching and searching, this feature is just missing in netbeans although it would absolutely straightforward to implement and has been ask by user for 2 more than years...
Regards,
Stéphane
There is a Terminal window in NetBeans 7:
Open the menu, Window -> Output -> Terminal
What about using an Ant target? Ant files are quite comfortable to run from Netbeans.
<exec executable="${executable-full-path}" ...
The best option I've found is to use jmarsault's plugin that he calls NetBeans Command Shortcuts. This give you an icon in the command line where you can add command and terminal scripts to run. The display shows in the output window.
Installation files are available here and he has kept it up to date with the newest versions of NetBeans.
NetBeans Command Shortcut plugin
Installation:
Download the .nbm file for your version of NetBeans
Open Tools / Plugins / Downloaded / Add Plugins...
Select the .nbm file and allow the installation of the plugin.
In since at least version 9.0, there are two decent options:
Just create a script file. (I think you need the C++ plugin for this. Otherwise you have to create it outside NetBeans or as a text file.) In my case I created a JLinkGDBServer.sh that just executes JLinkGDBServer as a prerequisite to start an embedded debug session. This automatically sends the executable's output to a NetBeans terminal.
Add a tool to Tools/Options/Miscellaneous/SendTo. SendTo is a pop-up menu item for certain project entities, for example files but not the project. In my case, I could add a SendTo running the executable and use it by right-clicking on for example the .elf file (although for the GDB server I don't need any file name as an argument).

How do I configure the place of the Netbeans .netbeans directory?

I want Netbeans 6.1 to store the .netbeans directory in another place than the default. How do I do this?
You can also specify this when you run Netbeans IDE via the command line. This is useful if you want to have different profiles/working environments in the IDE or when you are testing out Netbeans IDE plug-ins. This works from 5.0 to the current version (6.5).
Simply specify "--userdir " on the command line. Example:
netbeans --userdir /local/file/system/netbeans/userdir/6.1
There's config file:
<Netbeans>/etc/netbeans.conf
netbeans_default_userdir=<dir>