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

Implementations of multiple methods #57

Open MaxGor90 opened 1 year ago

MaxGor90 commented 1 year ago

Hi! When I select multiple methods and do "Create implementation" implementation is created for the 1st one only, while on your preview you easily create implementations for all selected methods.

Maybe there's some special way of selecting methods I'm unaware of? I'm just selecting regularly with cursor and Shift.

hattesen commented 1 year ago

I am also wondering how you select multiple functions.

I know that the "select multiple functions" feature exists, as it is shown in the video on marketplace: Marketplace: C++ Helper

@amir9480 can you clarify how multiple functions are selected for "Create Implementation"?

hattesen commented 1 year ago

SOLVED!

I have found a way of selecting multiple functions for "Create Implementation", by experimenting with different modifier keys and clicks. It turns out that it is related to the "multiple cursor" feature of VS Code.

For each function to be selected: Alt + double-click (Option + double-click on MacOS) on the function name, which will leave the function name highlighted (with a blinking cursor).

Screenshot 2022-11-22 at 15 41 18

Strangely, the Keyboard Shortcut Reference Windows or MacOS defines Alt + click/Option + click as "Insert cursor", but doesn't define an Alt + double-click shortcut, which may be desribed as "Insert highlighted cursor" or "Insert selected cursor".

@amir9480 this should probably be mentioned in the plugin description, as the multi-selection shortcut is unintuitive and possibly undocumented in VS Code.