Good C++ editor for GEANT4

Excuse me if I specify wrong category. I don’t know which one is right category for such question.

Advise please a good C++ editor for GEANT4 where there was shown a list of variables and methods of certain class after writing “->”. I mean that I’m using Qt Creator and for example when I write G4ThreeVector Mom = aStep-> there no appears list of methods or variables. Also it’s desirable that in the recommended editor there highlighted errors.

when I write this, there is a list of stuff available. Do you have configured Geant4_DIR, and something equivalent to

# Find Geant4 package, activating all available UI and Vis drivers by default
# You can set WITH_GEANT4_UIVIS to OFF via the command line or ccmake/cmake-gui
# to build a batch mode only executable
option(WITH_GEANT4_UIVIS "Build example with Geant4 UI and Vis drivers" ON)
  find_package(Geant4 REQUIRED ui_all vis_all)
  find_package(Geant4 REQUIRED)

# Setup Geant4 include directories and compile definitions
# Setup include directory for this project

in you CMakeLists.txt

No. I didn’t ever configured something in CMakeLists.txt files. I forget tell that I wok in ubuntu. Does it matter ?

VSCode is a good option, but like all editors/IDEs it requires learning and exploring the various extensions and settings to enable the functionality you’re after The docs are pretty helpful in getting things set up, e.g. see the C++ section for specifics like syntax highlighting and completion (“Intellisense” in general).

One tip with CMake is to configure your application with CMAKE_EXPORT_COMPILE_COMMANDS=ON. This produces a file which a lot of tools understand to look up paths and the like to find completions.

Where should I set the line CMAKE_EXPORT_COMPILE_COMMANDS=ON ?

As a standard CMake option when running to configure your project, e.g.


or set it directly in your main CMakeLists.txt script, e.g.


# later

I use SublimeText:

As you can see, i can spilt the window in 2, in that way I can open all .hh and .cc, meanwhile in the left i have the folder of the application.

In the bottom, i have (always in Sublime) a terminal in order to compile and run the code.