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

Support an option to force hanging rather than aligned indent #131

Open
ssokolow opened this issue Nov 16, 2019 · 2 comments
Open

Support an option to force hanging rather than aligned indent #131

ssokolow opened this issue Nov 16, 2019 · 2 comments

Comments

@ssokolow
Copy link

While I haven't tested it enough to be sure it's the right way to accomplish what I want, I just modified the version of vim-python-pep8-indent that I got through vim-polyglot as follows:

        " DISABLED: Indent to match position of opening paren.
        " let res = paren_col
        "
        " Force nothing_after_opening_paren-style indentation to avoid having
        " to wear out my dedent keybind fighting with the indenter in 
        " situations like this:
        "
        "   parser.add_argument('-v', '--verbose', action="count", default=2,
        "       help="Increase the verbosity. Use twice for extra effect.")
        "   parser.add_argument('-q', '--quiet', action="count", default=0,
        "       help="Decrease the verbosity. Use twice for extra effect.")
        let res = base + s:sw()

It'd be really nice if I could just set something like this and get on with my life:

let g:python_pep8_indent_disable_paren_aligned = 1
@ssokolow
Copy link
Author

Hmm. After more experimentation, it looks like I'm going to need something a little fancier, because I do use both.

I guess I'll have to investigate whether it's easier to make EnterTab produce an aligned indent in what would normally be a base + s:sw() indent situation or to make EnterBackspace generate a base + s:sw() indent (respecting the extra indent for function parameters) in what would normally be an aligned indent situation.

@ranelpadon
Copy link

I would like to have this option as well, since I auto-indent the cursor most of the time:

let g:python_pep8_indent_disable_paren_aligned = 1

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