Skip to content

Tab size in github source view easily fixed #3798

@BsAtHome

Description

@BsAtHome

Tabs in the source are by default interpreted as a distance of 8 spaces. The LinuxCNC code base uses a 4 spaces indentation and there are many files that use a combination of spaces and tabs. This leads to bad indentation in the view,both in github source view and in user's editor.

A very simple solution, without re-indenting the entire source-tree, is to add this little line at the bottom of C/C++ sources and headers:

// vim: ts=4 sw=4

It sets the tabsize (ts) to 4 and the shiftwidth (sw) to 4 (used for < and > commands in vim).

Github knows how to interpret that and anybody who uses a sane editor (sorry for the flame(*)) will also see everything as it should be.

(*) not really ;-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions