Skip to content

A lightweight and efficient Visual Studio Code extension that enables toggling read-only mode for any file using a keyboard shortcut, context menu, or Command Palette. Protect your files from accidental edits with clear visual indicators and persistent state across sessions.

Notifications You must be signed in to change notification settings

Harishri2002/CodeFreeze

Repository files navigation

🧊 CodeFreeze for VS Code

A lightweight and efficient Visual Studio Code extension that enables toggling read-only mode for any file using a keyboard shortcut, context menu, or Command Palette. Protect your files from accidental edits with clear visual indicators and persistent state across sessions.

Demo

CodeFreeze-Demo.mp4

✨ Features

  • Toggle Read-Only Mode: Use Ctrl+Alt+F (Windows/Linux) or Cmd+Alt+F (macOS) to lock/unlock files
  • Visual Indicators: Prominent status bar indicators show when a file is locked
  • Command Palette Integration: Access via Ctrl+Shift+P and search for "CodeFreeze: Toggle Read-Only Mode"
  • Context Menu Support: Right-click a file to toggle read-only mode
  • Persistent State: Read-only status persists across editor sessions
  • Status Bar Indicator: Displays the current mode (Read-Only /Editable)

📥 Installation

  1. Open VS Code
  2. Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X)
  3. Search for "CodeFreeze"
  4. Click Install to add the extension
  5. Reload VS Code if prompted

Alternatively, install via the VS Code Marketplace or by running:

code --install-extension CodeFreeze

🚀 Usage

Open any file in VS Code. Toggle CodeFreeze:Read Only mode using one of these methods:

  • Keyboard Shortcut: Press Ctrl+Alt+F (Windows/Linux) or Cmd+Alt+F (macOS)
  • Command Palette: Press Ctrl+Shift+P, then type Toggle Read-Only Mode
  • Context Menu: Right-click the file in the editor and select Toggle Read-Only Mode

When locked, the file cannot be edited or saved, and a status bar indicator confirms the mode.

🔧 Extension Settings

This extension contributes the following settings:

  • CodeFreeze.toggle: Command to toggle CodeFreeze for the active file

You can customize the keyboard shortcut in VS Code's Keyboard Shortcuts settings.

⚠️ Known Issues

No known issues at this time.

📝 Release Notes

0.1.0

  • Initial release of the CodeFreeze extension
  • Features include keyboard shortcut, Command Palette, context menu, and status bar integration

0.1.0

  • Read-only mode edit bug fixed

👥 Contributing

Contributions are welcome! To contribute:

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request

Built with ❤️ for the VS Code community.

About

A lightweight and efficient Visual Studio Code extension that enables toggling read-only mode for any file using a keyboard shortcut, context menu, or Command Palette. Protect your files from accidental edits with clear visual indicators and persistent state across sessions.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published