Skip to content

Repository files navigation

Int-Maxer Extension for VS Code

Author: Palamarchuk Arseniy, ITMO, M3105

Int-Maxer is a Visual Studio Code extension that automatically upgrades all integer variable types in your C++ files to their largest counterparts. For example, it transforms int8_t into int64_t and uint16_t into uint64_t. This tool is perfect for developers who need to ensure maximum data capacity for integer types.

Features

  • Automatically replace all occurrences of smaller integer types with their largest equivalents:
    • int8_tint64_t
    • uint8_tuint64_t
    • int16_tint64_t
    • uint16_tuint64_t
    • int32_tint64_t
    • uint32_tuint64_t
  • Works seamlessly with C++ files.
  • Adds a button in the status bar to activate the transformation with a single click.

Requirements

  • Visual Studio Code version 1.95.0 or higher.
  • Node.js installed for development or debugging purposes.

Installation

  1. Clone the repository:
    git clone https://github.com/your-repo/int-maxer.git
    cd int-maxer
  2. Install dependencies:
    npm install
  3. Compile the extension:
    npm run compile
  4. Open the project folder in Visual Studio Code.
  5. Press F5 to launch the extension in a new Extension Development Host window.

Usage

  1. Open a C++ file in Visual Studio Code.
  2. Trigger the extension using one of the following methods:
    • Open the Command Palette (Ctrl+Shift+P), type Maximize Variable Types (C++), and press Enter.
    • Click the Maximize Types button in the status bar (bottom-right corner of the editor).
  3. All eligible types in the file will be replaced with their larger equivalents.

Development

Folder Structure

  • src/: Contains the TypeScript source code for the extension.
  • out/: The compiled JavaScript code generated by TypeScript.
  • package.json: Configuration and metadata for the extension.

Scripts

  • Compile TypeScript:
    npm run compile
  • Watch for TypeScript changes:
    npm run watch

Debugging

  1. Open the project in Visual Studio Code.
  2. Go to the Run and Debug panel.
  3. Start debugging with the Launch Extension configuration.

Limitations

  • Works only with standard fixed-width integer types (int8_t, uint8_t, etc.).
  • Does not handle custom integer typedefs or unusual naming conventions.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages