Skip to content

Emmet: does not work in php's heredoc nor nowdoc #29320

Closed

Description

@jens1o
  • VSCode Version: Code - Insiders 1.14.0-insider (779a7df, 2017-06-23T05:59:57.891Z)
  • OS Version: Windows_NT ia32 10.0.15063
  • Extensions:
Extension Author (truncated) Version
path-intellisense chr 1.4.2
gitlens eam 4.1.3
tslint eg2 0.15.0
LogFileHighlighter emi 1.1.1
vscode-reveal evi 0.0.9
php-debug fel 1.10.1
php-intellisense fel 1.4.1
auto-close-tag for 0.4.2
gc-excelviewer Gra 1.1.15
GitHubIssues Hoo 0.1.2
composer ika 0.5.0
smarty imp 0.2.0
json-to-ts Mar 1.4.3
vscode-apache mrm 1.1.1
cpptools ms- 0.11.4
php-docblocker nei 1.2.0
vscode-versionlens pfl 0.19.1
vscode-icons rob 7.9.0
sharecode Rol 0.4.1
code-spell-checker str 1.2.0
vscode-todo-highlight way 0.5.5
highlight-trailing-white-spaces yba 0.0.2

(1 theme extensions excluded)


Steps to Reproduce:

  1. Write this php code:
<?php

const TEST = <<< 'TESTHEREDOC'
| // <-- your cursor
TESTHEREDOC;
  1. Write something like html:5 and want to resolve that expression. You need to do it via the command palette, which is annoying.

Activity

  1. added
    bug
    php
    on Jun 23, 2017
  2. jens1o commented on Jun 23, 2017

    @jens1o
    ContributorAuthor

    VSCode Bot (@vscodebot)[bot] Don't make me angry. This is meant for Ramya Rao (@ramya-rao-a)

  3. jens1o commented on Jun 23, 2017

    @jens1o
    ContributorAuthor

    Does not work in simply echo steps too, nor in variables... Maybe we should consider changing the header, because once we are in php code, we can't do anything.

  4. jens1o commented on Jun 23, 2017

    @jens1o
    ContributorAuthor

    Pretty funny: It works when it the result would be invalid php.

    For example:
    image

    Goes to
    image

  5. ramya-rao-a commented on Jun 23, 2017

    @ramya-rao-a
    Contributor

    By default, suggestions are not prompted inside strings and comments. This is a VS Code feature and can be controlled in the below setting

    "editor.quickSuggestions": {
    		"other": true,
    		"comments": false,
    		"strings": true
    	}
    

    I am guessing (guessing because I don't know much about php) that in php, the TESTHEREDOC part is considered as a string and so you don't get any suggestions.

    To get around this either update the above setting and set the strings part to true or hit Ctrl+Space to manually trigger suggestions.

    Sample applies to echo statements or variables where you are typing inside quotes and so the context is that of a string.

  6. added
    *as-designed
    and removed
    bug
    on Jun 23, 2017
  7. ramya-rao-a commented on Jun 23, 2017

    @ramya-rao-a
    Contributor

    Regardless, with #28286 (comment) the emmet suggestions will no longer appear until a php extension supports it

    The Emmet: Expand Abbreviation will continue to work

  8. locked and limited conversation to collaborators on Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*as-designedemmetphp

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions