You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Coding Standards
Vint
and do everything it says. ALE will check your Vim code with Vint automatically. See: vintsnake_case
names for variables and arguments, andPascalCase
names for functions. Prefix every variable name with its scope. (l:
,g:
, etc.)function
,if
,for
,while
, orreturn
, which doesn't start a new level of indentation. This makes the logic in your code easier to follow.function
instead offunc
, andendif
instead ofend
.!
, so files can be reloaded. Use the |abort| keyword for all functions, so functions exit on the first error.Author:
andDescription:
comments.To implement:
The text was updated successfully, but these errors were encountered: