Real-Time Naming Convention
Developers often work with multiple programming languages, each with its own set
of naming conventions. Manually adapting to each convention can be error-prone
and time-consuming. This extension solves that problem for you.
Simply type in a new variable name with spaces, like
new fancy name, and this
extension will automatically adapt it to the naming convention of the language
you're working in:
Just type it like this:
class some class:
def some method(self, some parameter, another parameter):
self.some field = 42
def some function(some parameter, another parameter):
some variable = 42
for some int in [1, 2, 3]:
As soon as you type the above, you will get:
def some_method(self, some_parameter, another_parameter):
self.some_field = 42
def some_function(some_parameter, another_parameter):
some_variable = 42
for some_int in [1, 2, 3]:
Note on Existing Names
This extension is designed to assist you in creating new variable, function, or class names by automatically adapting them to the naming convention of the language you're working in. It will not modify names that are already defined in your codebase.
For existing names, this extension is fully compatible with and encourages the use of VS Code's built-in autocompletion features. Simply start typing the name, and VS Code's autocompletion will help you complete it, without any interference from this extension.
Supported Languages and Features
Python Naming Conventions and Syntax for Defining Names
In Python, naming conventions play a critical role in enhancing code readability
and maintainability. The naming of variables, functions, classes, and other
entities must be consistent and self-explanatory. This section outlines the
various syntactical locations where new names can be introduced in Python,
accompanied by the naming conventions commonly adhered to.
snake_case for variable names.
variable_name = value
snake_case for both the function name and its parameters.
def function_name(param1, param2):
PascalCase for class names.
snake_case for loop variables.
for item_name in iterable:
snake_case for the loop variables.
[ <expression> for item_name in iterable ]
With / Import statements
snake_case for context variable names.
from module import entity as entitiy_name
with open("file.txt") as file_handle:
snake_case for exception variable names.
except Exception as error_name:
Lambda Function Parameters
snake_case for the lambda function parameters
lambda param_name: <expression>
Class Attribute and Method Definitions
PascalCase for class names, and
snake_case for attribute and method names.
class_attribute = value
def method_name(self, param_name):
Global and Nonlocal Statements
snake_case for the variable names
snake_case for argument names.
snake_case for all unpacked variable names.
u_a, u_b, *u_rest = [1, 2, 3, 4, 5]
Users appreciate release notes as you update your extension.
- Initial release, support limited naming convention of Python.
for loop in python and add test cases.
- Support recording input statistics for research purposes.
- Supports full Python grammar
- More powerful input recordings (for research purposes)
- Fix Python assignment patterns
- No auto correction while recording
- Fix duplicate recording disposable
- Add Python unpacking patterns
- Add demo GIF in readme.md