-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
added a deindent() function . #267
Conversation
Hey, thanks for contributing! As an aside: |
@bitwiseman Thanks for your comment. Last few years, I'm using jsbeautify.vim, and I modified the jsbeautify.vim. When I improve the format of 'switch', I found there's a need of deindent function. I know 'switch' may be the only place need de-indent, but I think it's better to write 'deindent()' than write 'self.flags.indentation_level -= 1'. |
@bitwiseman I'm not sure the restore_mode is good or not. I think I may confuse when I use restore_mode. Because I should define a place to restore. |
@will-v-king said:
Agreed, but in jsbeautify.vim the function like what you implemented is called unindent. That sounds better to me. If you can make that change (and rebase you commits into one commit with a meaningful first line in the commit message), I'll be happy to merge this. |
As English is not my mother language. I was entangled with which prefix is better to use, de or un, when I name the function. And I remember I googled the question like 'difference between de- and un-'. Then I got the answer which said 'de' is better. "Best Answer - Chosen by Voters Eg. My phone number is unlisted. More examples - more:http://english.stackexchange.com/search?q=+de+un |
I have question about how to rebase my commit. Oh,I googled and used the rebase. And commit again. I'm not sure if I should close this request and open a new one. |
…ifier/__init__.py . deindent() is used to reverse the indent() action.
I am an english speaker, and you just schooled me. 😄 Thanks! |
added a deindent() function .
deindent() makes coding easier.
Also it's good for the further modification about indent/de-indent behaviour.