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

improve commented placeholder ${number:#text} #106

Open
stardiviner opened this issue Nov 25, 2012 · 1 comment
Open

improve commented placeholder ${number:#text} #106

stardiviner opened this issue Nov 25, 2012 · 1 comment

Comments

@stardiviner
Copy link
Contributor

Sometimes I hope to add some description text into placeholder for placeholder default text. (Those description text should be auto removed, so use commented placeholder). But commented placeholder does not allow other formats.

The improved commented placeholder should can allow other placeholder format behind commented placeholder.
Here is an prototype: (The | is the cursor)

snippet if
    if ${1:#:condition:default text}
        ${2}
    endif

after expand the if snippet, it should looks like this:

if `<1:|#:condition:default text>`
    `<2>`
endif

If do not do anything, just jump to next placeholder, then the commented placeholder auto removed.

if default text
    |
endif

And I type something in placeholder 1. Then it becomes like this:

if typed text
    `<2>`
endif

Just like targeted placeholder ${1:TARGET:default text}.

What do you think ?

@Shougo
Copy link
Owner

Shougo commented Dec 2, 2012

OK. I will put it on todo list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants