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

Add vim fold marker snippet #25

Open
Xvezda opened this issue Jul 29, 2020 · 0 comments
Open

Add vim fold marker snippet #25

Xvezda opened this issue Jul 29, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Xvezda
Copy link
Owner

Xvezda commented Jul 29, 2020

Using UltiSnips's ${VISUAL}.

Grab previous closest opening fold marker e.g.) {{{N, Check next closest closing fold marker N}}}.
Then parse N to compare both open/closing markers.

If two numbers are different, then cursor is out of folding context. So, create folding marker with number 1; {{{1, 1}}}.
Else, cursor is between of N fold markers. So, increase N+1 to create {{{N+1, N+1}}} fold markers.

@Xvezda Xvezda added the enhancement New feature or request label Jul 29, 2020
@Xvezda Xvezda self-assigned this Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant