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

Unindent in snippet? (switch/case) #262

Open
metasprite opened this issue Jan 15, 2018 · 1 comment
Open

Unindent in snippet? (switch/case) #262

metasprite opened this issue Jan 15, 2018 · 1 comment
Assignees

Comments

@metasprite
Copy link

When I type something like case ...: inside a switch then it will unindent it so it looks like (correct)

switch (...) {
case ...:
}

instead of

switch (...) {
        case ...:
}

But if I make a snippet that writes case ...:, it does not unindent to the correct level, so it looks like the second example, when I want it to look like the first. So is there a way, anyway at all, that I can unindent in a snippet?

@ajzafar
Copy link
Collaborator

ajzafar commented Feb 11, 2018

@metasprite Sorry for the delayed response! Just to clarify, you mean that when you're inside a switch and type case ...: Vim will automatically unindent, right? While if you use a snippet to expand just case ...: Vim won't do that. This is what you're referring to, right? Unfortunately SnipMate doesn't offer a solution for this at the moment. There's a feature I've been meaning to implement for a long time now that can help with this, but unfortunately I haven't gotten there yet.

@ajzafar ajzafar self-assigned this Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants