microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.63k stars 29.04k forks source link

Show tabstops as cursors in emmet preview #29323

Closed jens1o closed 7 years ago

jens1o commented 7 years ago
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)


Can we please see where the cursor will be inserted, that would be kind of awesome!

For example: image (The first, big one shows where the cursor will be first, and then it shows each following cursor position reached by tab)

ramya-rao-a commented 7 years ago

If anyone is interested in picking this one up, ping me and I can help you get started

jens1o commented 7 years ago

@ramya-rao-a I'm interested! :D

ramya-rao-a commented 7 years ago

@jens1o Great!

https://github.com/ramya-rao-a/vscode-emmet-helper/blob/master/src/emmetHelper.ts#L108 is where I remove the text mate style tabstops from the snippet returned form emmet.

So <img src="${1}" alt="${2}"> becomes <img src="" alt="">

And https://github.com/ramya-rao-a/vscode-emmet-helper/blob/master/src/emmetHelper.ts#L40 is where the text gets assigned to the documentation attribute of the completion item. VS Code takes care of the rest.

Happy Coding!

ramya-rao-a commented 7 years ago

Once you have the vscode dev env set up, you can start by making changes directly to the javascript file emmetHelper.js in extensions/emmet/node_modules/vscode-emmet-helper.

Once you are happy with your changes, send a PR to https://github.com/ramya-rao-a/vscode-emmet-helper

jens1o commented 7 years ago

Thanks, will take a look as soon as possible(I think on Sunday)!

jens1o commented 7 years ago

Something new here?

ramya-rao-a commented 7 years ago

Hey @jens1o!

Am so sorry, I didn't see your PR for this issue until now :(

And a lot has changed since you submitted the PR. Can you get the latest for the helper and merge the latest changes?