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

We need to use the Coding Standards that ALE provides #7

Open
2 tasks
JuanDAC opened this issue Aug 15, 2021 · 0 comments
Open
2 tasks

We need to use the Coding Standards that ALE provides #7

JuanDAC opened this issue Aug 15, 2021 · 0 comments
Assignees

Comments

@JuanDAC
Copy link
Owner

JuanDAC commented Aug 15, 2021

Coding Standards

The following general coding standards should be adhered to for Vim code.

  • Check your Vim code with Vint and do everything it says. ALE will check your Vim code with Vint automatically. See: vint
  • Try to write descriptive and concise names for variables and functions. Names shouldn't be too short or too long. Think about others reading your code later on.
  • Use snake_case names for variables and arguments, and PascalCase names for functions. Prefix every variable name with its scope. (l:, g:, etc.)
  • Try to keep lines no longer than 80 characters, but this isn't an absolute requirement.
  • Use 4 spaces for every level of indentation in Vim code.
  • Add a blank line before every function, if, for, while, or return, which doesn't start a new level of indentation. This makes the logic in your code easier to follow.
  • End every file with a trailing newline character, but not with extra blank lines. Remove trailing whitespace from the ends of lines.
  • Write the full names of commands instead of abbreviations. For example, write function instead of func, and endif instead of end.
  • Write functions with !, so files can be reloaded. Use the |abort| keyword for all functions, so functions exit on the first error.
  • Make sure to credit yourself in files you have authored with Author: and Description: comments.

To implement:

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