Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto surround selected word with quotes stopped working for php #6889

Closed
ChazyTheBest opened this issue May 25, 2016 · 7 comments
Closed

auto surround selected word with quotes stopped working for php #6889

ChazyTheBest opened this issue May 25, 2016 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug php PHP support issues verified Verification succeeded
Milestone

Comments

@ChazyTheBest
Copy link

ChazyTheBest commented May 25, 2016

  • VSCode Version: 1.1.1
  • OS Version: Manjaro 16.06 (rc1)

I don't know what happened but yesterday I was writing some code and when I selected a word and pressed ' the word was quoted, now the word is replaced by one ' instead.

Brackets are still auto closing though...

If I change the language mode from php to another, like c++, then it'll work but if I change it back it won't...

If I rename my settings file (the one inside .vscode) and I restart vscode then it'll work, but if I restart again it won't. Strange behavior... I can reproduce this (renaming and restarting).

These are my settings:

{
    "editor.detectIndentation": false,
    "editor.wrappingColumn": -1,
    "editor.renderWhitespace": true,
    "emmet.triggerExpansionOnTab": false,
    "css.lint.compatibleVendorPrefixes": "warning",
    "css.lint.duplicateProperties": "warning",
    "css.lint.universalSelector": "warning",
    "css.lint.zeroUnits": "warning"
}
@ChazyTheBest ChazyTheBest changed the title auto surround selected word with quotes stopped working auto surround selected word with quotes stopped working for php May 25, 2016
@aeschli
Copy link
Contributor

aeschli commented May 26, 2016

@ChazyTheBest Did you install any PHP related extensions?
You can try to run VS Code without extensions with code --disable-extensions

Surrounding with quotes is disabled in PHP comments and strings. Is that maybe what you see?

@aeschli aeschli self-assigned this May 26, 2016
@ChazyTheBest
Copy link
Author

ChazyTheBest commented May 26, 2016

The only feature that doesn't come built-in and that I need is ftp on save, so I have ftp-sync installed, and nothing more than I'm aware of.

I'm not sure that feature is disabled for comments and strings for php at all, I can surround any selected text in php code, when VS Code wants to ofc.

Do you need visual proof? I could make a video or gif, I can surround any selected text with quotes.

But the problem still remains, when I close and open VS Code again the feature stops working completely for php.

Well, the truth is that it's not the next time I open VS Code and also does not involve the settings. I've just enabled my settings (by renaming the file) and restarted, and it worked then I restarted again and it was still working but the third time it stopped working. Could it be something wrong with my OS or configs? (Not a VS Code problem?).

It's a very strange behavior...

@aeschli
Copy link
Contributor

aeschli commented May 27, 2016

A screenshot or animated gif would would be great. I have no clue so far what it could be. I tried to reproduce what you are seeing, but for me surrounding with quotes works for me in PHP.

@ChazyTheBest
Copy link
Author

ChazyTheBest commented May 27, 2016

I also have no clue why is it acting like that. It's like "now I want to work, but the next time I start... who knows"? :P

I'm creating the gif file.

EDIT: convert is taking a filetime to reduce the filesize...

@ChazyTheBest
Copy link
Author

The following gif demonstrates that, sometimes, autoclosing quotes doesn't work for PHP. I also noticed that it became less frequent, only 1 out of 10 times it fails. Yesterday was just the opposite...

out

@aeschli
Copy link
Contributor

aeschli commented May 30, 2016

@ChazyTheBest Thanks a lot, now I see it too.

The problem was the merging of the settings in php.configuration.ts and the settings is code.
It was a timing issue, depending on what came first, the results from the file or from the extension.

@aeschli aeschli added php PHP support issues bug Issue identified by VS Code Team member as probable bug labels May 30, 2016
@aeschli aeschli added this to the June 2016 milestone May 30, 2016
@ChazyTheBest
Copy link
Author

You're welcome, I'm glad I could help.

@dbaeumer dbaeumer added the verified Verification succeeded label Jul 4, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug php PHP support issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants