Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically open a file, when project is imported into IDE

Problem: I am trying to force IDEA/Eclipse to open a README.md file, once project is imported into workspace. After searching for a bit already, I can't find a solution. So my question:

Is there a way to force IDE to open a file automatically?


  • I know that there are plugins for viewing mark-up files, but this is not what I am looking for
  • Question is the same as this one : Automatically open a file when a solution/project loads, but I want a new project to be opened with a file.
like image 803
anasmi Avatar asked Jan 24 '26 09:01

anasmi


1 Answers

IntelliJ Idea provides a CLI. When you try to open a pom.xml and there are no IntelliJ Idea project files, the project will be imported. Else the project will be opened.

I assume from your comments, that you import new projects on a regular base. So, open the pom.xml, wait a few seconds to give IntelliJ the chance to create project files and then open the README.md will open that file in your fresh imported project.

The following bash script worked for me:

idea pom.xml & sleep 5 && idea README.md

Don't know if that is an option, because I don't your way to work. Do you like command lines or not aso.

Read How to import a Maven project with Intellij Command line tool with command "idea pom.xml"? in order to get CLI working.

like image 52
Peter Avatar answered Jan 25 '26 22:01

Peter