Skip to content

Conversation

@idbrii
Copy link

@idbrii idbrii commented Nov 21, 2018

Support zero-column compiler directives.

Handle attributes followed by compiler directives.

I've also made a PR for these changes to nickspoons/vim-cs. I'll push future fixes there, since the maintainer is more active.

Compiler directives should go to the first column if that's what the
user configured.

Fixes directive when it follows an attribute line:

            [SerializeField]
    #if UNITY_EDITOR
            public
    #endif
                string m_PrettyName = "";

However, content inside directive (public) is still indented
incorrectly.
Prefer function names over comments.

Easier to remove the s: off of these and interactively do:
    echo IsAttributeLine(getcurpos()[1])
Now content inside directive (public) is indented correctly (matches
attribute):

        [SerializeField]
    #if UNITY_EDITOR
        public
    #endif
            string m_PrettyName = "";
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

Successfully merging this pull request may close these issues.

1 participant