jason-pomerleau / vscode-wordpress-toolbox

The ultimate WordPress snippet collection for Visual Studio Code.
MIT License
41 stars 8 forks source link

Position of cursor after pressing enter #10

Closed jonalange closed 2 years ago

jonalange commented 2 years ago

Is there a way to control where the cursor is after I hit enter?

| represents the cursor in my examples.

When I type get_template_dir and hit enter, this gets autofilled:

get_template_directory(  )|

The cursor is at the end. But actually I want to write something in the brackets and I have navigate there myself everytime. It would be great to have the cursor inside the brackets like this:

get_template_directory( | )

Are there options for this? I couldn't find them.

jason-pomerleau commented 2 years ago

Hi @jonalange, the get_template_directory( ) function takes no arguments[1], which means there shouldn't ever be anything added in between the brackets.

[1] https://developer.wordpress.org/reference/functions/get_template_directory/

jonalange commented 2 years ago

Ah well, yes my bad! Overlooked that. I thought I have experienced that with other functions and just used this one as example. When I come across one I will open a new issue.