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

Implement custom variable register api (simple version) #95

Merged
merged 4 commits into from
Aug 11, 2020

Conversation

hrsh7th
Copy link
Owner

@hrsh7th hrsh7th commented Aug 11, 2020

This PR is simplified version of #94.

The omitted feature is the variable resolving at every synchronization.

For example, #95 can create $BORDER custom variable but this not.
However, I think the feature is too rich so this PR is reasonable too.

let l:selected_text = vsnip#selected_text()
if !empty(l:selected_text)
" TODO: fix indentation with a:context
return l:selected_text
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, s:Variable.resolve can't provide detailed context to fix the indentation so we should re-design s:Variable.resolve timing.

@hrsh7th hrsh7th merged commit 3996551 into master Aug 11, 2020
@hrsh7th hrsh7th deleted the custom-variable-simple branch August 11, 2020 17:40
@hrsh7th hrsh7th mentioned this pull request Aug 11, 2020
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

Successfully merging this pull request may close these issues.

1 participant