IntellliJ IDEA LightEdit mode won't open file if IDE already running - intellij-idea

When I use the idea command line tool to open a file in LightEdit mode
$ idea myfile.txt
and IDEA is already open in project mode it will not open file file. IDEA gets focus but the file does not open.
However, when I used the idea command line to open a file in LightEdit mode and IDEA is not already open, it works as expected.

If you use the Create Command-line launcher option to recreate the idea launcher file it will start working as expected.

Related

Open a directory/folder from IntelliJ IDEA using Command Prompt

I want to open this folder which is a GitHub repository clone(D:\Acc\Tutorials\Programming\course-angularjs) from IntelliJ IDEA, using the windows command prompt. I can open the folder using commands like subl . for Sublime text and code . for VS Code. But I couldn't find the command to open it from the IntelliJ IDEA.
D:\Acc\Tutorials\course-angularjs>subl .
I found from some other answers that there is a way from IntelliJ IDEA, which is, Tools->Create command line Launcher. But I couldn't find it in mine. I am currently using IntelliJ IDEA Community version 2019.2.
I also used <Intelli IDEA> in the command prompt without knowing what it would do. But it also didn't work.
So is there any direct command for IntelliJ IDEA to open a folder, from the Command prompt?
Use idea . to open the project from the current directory.
To know more..

Force PhpStorm to recognize a project file

I have an annoying scenario in PhpStorm;
When I open a file by invoking the PhpStorm launcher with a relative file path as the only argument (phpstorm src/ZumbaController.php) the application will launch, but as the file is saved a prompt appears;
open a file from the terminal
dreaded confirm write-file dialog
Opening the file by the full, absolute path does not help. Having the current working directory of the shell be the real path of the project does not help either (opening from the real project directory). Is there a way to instruct PhpStorm that this file belongs to the currently-open project?
(I considered posting on superuser, but this is more of a programers-only problem)

IntellijIdea 13: use terminal window to open file in the IDE

IntellijIDEA 13 has an embedded shell in a terminal window. That's nice.
Is it possible to open a file from within this terminal window in the IDE for editing?
Update:
What I want is an alternative way to open a file for editing from inside the IDE.
Instead of using the "Open File..." dialog I want to open a file using IDEA's built in terminal window which I now use a lot to run other commands as well.
IDEA's "Go to anything" dialog is another alternative but it only works for files within my project.
Update 2
A good enough solution has been posted here IntelliJ: how to open files in an existing IntelliJ from the command line:
$ open -b com.jetbrains.Intellij README.md
opens the file README.md in the current running IDE. It works from the embedded terminal window as well as any other Terminal emulator you are using.
Since you do want to open some files with their native application and execute commands as is, you can't reconfigure IntelliJ to open everything within itself. You can however use a batch script to send a file to IntelliJ. Save this batch somewhere in your path and you'll be able to run this from terminal and having the file opened in IntelliJ:
idea file.txt
Idea.bat example:
#echo off
setlocal
SET IJ_PATH="c:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 13.0.1\bin\idea64.exe"
IF [%1]==[] (
echo usage: %0 file_name
exit /B -1
)
IF NOT EXIST %1 (
echo %1 does not exist
exit /B -2
)
%IJ_PATH% "%~f1"

no response when execute .sh file by double click on fedora20

Today,I installed fedora20 on my computer and then downloaded the Intellij idea13, but when I execute the file by double clicking, there is no response. But it works well in a terminal with ./idea.sh.
Thanks, I need your help!
I'm not a fedora user but the following may help you to understand the problem.
When you double-click an item from the file manager, the default application for that type of file is loaded.
That depends on the configuration for the specific MIME type (which is application/x-sh).
There's a big chance that the default application for .sh files is set to gedit or kwrite depending on the desktop environment. The Intellij Idea installer is binary file and maybe the application is failing to load.
Have you tried right-clicking the file and select the option 'Open in Terminal'? The context menu may also show something like Execute or Launch.

How to open file with IntelliJ IDEA in new tab with command line?

How can I specify the file to open in new tab with IntelliJ IDEA via command line?
If I run in command line:
idea d:\Dropbox\Dropbox\featurea\featurea-common\src\com\featurea\common\util\FileManager.java
I get "No project found to open file in" error
Open file in new tab with opened project also fails.
Is there any way to manage IntelliJ IDEA to behave as I want?
Thanks.
You can't open individual files in the IDE from the command line when there is no open project and the IDE is not already running.
You can pass the project directory as an argument to open the project first, then you will be able to open individual files.