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

Indenting when pasting text #176

Open
ivangeorgiew opened this issue Aug 8, 2018 · 1 comment
Open

Indenting when pasting text #176

ivangeorgiew opened this issue Aug 8, 2018 · 1 comment

Comments

@ivangeorgiew
Copy link

When I try to paste and format text from a function, the indentation is wrong. However when I paste the text and then manually indent, it is correct.
This only occurs for xml text, everything else is indented correctly.
I tried echoing the results of the functions inside after/indent which decide if the indentation should be xml or js and they showed that the result's syntax groups missed '^xml' or '^jsx'
Therefore I believe the issue is from the syntax groups not being set immediately after the paste.
How can this be fixed?

@ivangeorgiew
Copy link
Author

For anyone else experiencing this annoying issue - you have to make use
:syn sync maxlines=(the number of lines between the beginning and the ending line of the paste)
and then reindent the pasted text.

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

1 participant