Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>c_shortcuts_to_pythonNew to Visual Studio Code? Get it now.
c_shortcuts_to_python

c_shortcuts_to_python

shivanshsanghvi

|
133 installs
| (0) | Free
An extension that adds some key strokes from C and other languages to Python, such as '//' to comment, ++ to increment, and -- to decrement. This extension works by changing this C syntax to equivalent Python syntax after you finish typing.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

c_shortcuts_to_python

Welcome to the README for the c_shortcuts_to_python extension. This extension brings some familiar C and other language shortcuts to Python in Visual Studio Code.

Features

This extension provides the following features for Python development:

  • // to #: Automatically converts // comments to Python-style # comments.
  • ++ to += 1: Converts ++ to Python’s += 1 increment operation.
  • -- to -= 1: Converts -- to Python’s -= 1 decrement operation.

Examples

Here's a look at how these features work:

Example 1: Comment Conversion

Before:

// This is a comment

After:

# This is a comment

Example 2: Increment Conversion

Before:

count++;

After:

count += 1

Example 3: Decrement Conversion

Before:

count--;

After:

count -= 1

Exemption Feature

To exempt a line from the transformations, add # EXEMPT on the line above:

# EXEMPT
count++;

In this case, count++; will not be converted to count += 1.

Screenshots

You can add screenshots or GIFs to demonstrate the extension's functionality. Place images in the images directory within your project folder and reference them like this:

Example Screenshot

Requirements

  • VS Code: This extension requires Visual Studio Code version ^1.90.0 or higher.
  • Python: Make sure you have Python installed on your machine for running Python scripts.

Extension Settings

This extension does not add any custom settings to the VS Code configuration.

Known Issues

  • The extension might not work properly with complex or non-standard Python syntax.
  • Make sure to add # EXEMPT on the line above if you want to prevent transformations.

Release Notes

0.0.1

  • Initial release of c_shortcuts_to_python.

0.0.2

  • Added # EXEMPT feature to prevent transformations.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft