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

Obey standard variables for indentation style #16

Open
mcandre opened this issue Jul 13, 2015 · 5 comments
Open

Obey standard variables for indentation style #16

mcandre opened this issue Jul 13, 2015 · 5 comments

Comments

@mcandre
Copy link

mcandre commented Jul 13, 2015

Emacs offers standard variables for configuring indentation styles, such as indent-tabs-mode and sws-tab-width. When an Emacs user configures these globally, it is expected that the different programming modes respect these settings. Unless overridden, please have dockerfile-mode inform its indentation settings to match indent-tabs-mode and sws-tab-width by default.

@drewcsillag
Copy link
Collaborator

You probably have (setq indent-tabs-mode nil) in your .emacs, you probably want

(setq-default indent-tabs-mode nil)

When using setq-default, dockerfile-mode does obey spaces in lieu of tabs.

I don't know anything about SWS (save for a quick duckduckgo'ing to find what sws-tab-width was), but it doesn't seem to be a standard emacs thing, so I don't know if there's some weird interaction between the standard emacs environment for tabs/spaces, etc. I would highly suspect that there's a standard emacs way to set the tab width, but I don't know it off hand.

@mcandre
Copy link
Author

mcandre commented Aug 13, 2015

Er, I have this at the top of my .emacs:

(setq-default indent-tabs-mode nil
              tab-width 2)

@pataquets
Copy link
Contributor

Issue gardening.
@mcandre does #43 fix the issue? Can it be closed?

@Hi-Angel
Copy link
Contributor

@drewcsillag @mcandre pls close the report, it's fixed. I just tested: creating a buffer with

RUN foo \
    bar

and then indenting bar results in it being indented with spaces as that's the default style in my configuration. Enabling M-x indent-tabs-mode and pressing TAB re-indents it using tabs instead.

@pataquets
Copy link
Contributor

@mcandre fancy to close the issue?

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

4 participants