I am trying to get something similar to VSCode Python Jupyter Notebook functionality but with C++, and I have succeeded for the most part by using Code Runner extension along with a custom python script to add a preamble to the cpp file before running it. However, I do not know of a way to make the same keybind that launches Jupyter Notebooks (Shift+Enter) working in cpp files but instead use the Code Runner, and so I was wondering if there is a built-in way or an extension that allows adding keybinds which are prioritized under a particular file extension.
It might also be that there is a better way to do what I'm trying to do that I do not know about. Regardless, it'd be helpful to find out about the options I have.
According to this answer:
"when"
section you should use the"editorLangId == ..."
clause and place the language you want to use where the...
is.In the end it should look something like this