amir9480 / vscode-cpp-helper

vscode extension to create implementation for c++ function prototypes.
https://marketplace.visualstudio.com/items?itemName=amiralizadeh9480.cpp-helper
MIT License
355 stars 31 forks source link

Feature Request: focus on already opened file instead of creating a duplicate tab #34

Open Ares9323 opened 3 years ago

Ares9323 commented 3 years ago

Hi, it's me again (this time I checked multiple times before opening a new issue)

I often work with my editor splitted vertically with .h files on the left and .cpp files on the right, if I click "Create implementation" and the .cpp file is visible, everything works fine and it focuses on the right window as you can see here:

image

If the .cpp is not focused on the right window, when I click "Create implementation" it creates another tab of the .cpp file in the current panel, despite I have the option "workbench.editor.revealIfOpen": true activated,. If I open an already opened file by clicking it in the file explorer, the editor will focus it instead of opening a new tab in the current editor (where I have the cursor), this doesn't work with the extension so I think it could be something related to the command it uses to open the file.

image

Thank you!

amir9480 commented 3 years ago

@Ares9323 Hi

I tried to fix this before https://github.com/amir9480/vscode-cpp-helper/commit/d82e822ef8cc6d6baf1267dda3e5ecad6c48346a

But still didn't found a way for all cases