RiFi2k / format-html-in-php

Basically this vscode extension uses all your standard configurations for html formatting, and your standard configurations for format on save, etc. It more or less works exactly how vscode should already work as it pertains to HTML in PHP files.
The Unlicense
33 stars 6 forks source link

Cursor moves to end of file on Format on Save. #11

Closed brian-guerrero closed 5 years ago

brian-guerrero commented 5 years ago

Is there any way to prevent the cursor from moving to the end of the file? I don't know if I'm the only one experiencing this.

RiFi2k commented 5 years ago

@brian-guerrero I'm gonna guess off the top of my head this is because you have

"html.format.endWithNewline": true

Most likely because of the way this plugin doesn't specifically register as a formatting provider it moves the cursor, or maybe it's the way I'm calling the JS Beautify formatting. Try setting it like this

"files.insertFinalNewline": true,
"html.format.endWithNewline": false

Let me know if that fixes it for you.

brian-guerrero commented 5 years ago

The problem still persists with the new settings.

RiFi2k commented 5 years ago

This is legit, I was on vacation for a few weeks will get this figured out and fixed ASAP

zsmhub commented 5 years ago

Hi, I have the same problem, too.

RiFi2k commented 5 years ago

Sorry it took so long!

zsmhub commented 5 years ago

thank you sir

james0r commented 1 year ago

I'm getting the cursor jumping on save/format. 91885b81-fa76-411d-8d47-a4b0eebd5ca7