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
Rules not properly indented after copy/pasting #8
Comments
kyleam
added a commit
that referenced
this issue
Apr 15, 2016
Don't use python-indent-region for indent-region-function. At first glance, setting indent-region-function to nil (that is, running indent-according-to-mode on each line) seems to indent rule blocks fine, though it will probably fail on more complex "run" values. However, this does mean that python-indent-region is no longer used when indent-region is called with a region that doesn't include a rule block, so it's probably worth adding a snakemake-indent-region function that calls python-indent-region in this case. Re: #8
When I copy/paste a rule it looks like this afterwards:
Hmm, pasting rules preserves the indentation for me, but I think that's
because I have electric-indent-mode disabled.
Normally, I'd just mark the region and press `=` (`evil-indent`) to
get the proper indentation, but that isn't working either.
I had left indent-region-function [1] at its default value
(python-indent-region), which isn't appropriate for rule blocks. Please
let me know how 66f0d24 works for you. In addition to making
indent-region useful, I'm hoping it solves the electric-indent-mode
paste issue.
[1] I'm assuming that evil just calls indent-region underneath.
|
I only evaled the two new files, did not install them in the |
I am experiencing the same problem with This rule:
expands into this:
|
This should work as of 5350b3b (Allow spaces after rule/subworkflow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I copy/paste a rule it looks like this afterwards:
Normally, I'd just mark the region and press
=
(evil-indent
) to get the proper indentation, but that isn't working either. I'll prolly look into it myself eventually, but would love input on what you think is happening/best ways to fix.The text was updated successfully, but these errors were encountered: