Skip to main content
CodePlanet Docs

Code Editor

Editor features and shortcuts

CodePlanet's built-in code editor provides a powerful, browser-based coding environment for solving problems and experimenting with code.

Editor Overview

The code editor is powered by Monaco Editor (the same engine behind VS Code), giving you a familiar, production-grade editing experience directly in the browser.

Core Features

FeatureDescription
Syntax highlightingLanguage-aware coloring for 13+ languages
Auto-completionIntelliSense-style suggestions as you type
Error highlightingReal-time syntax error detection
Multi-languageJavaScript, Python, Java, C++, TypeScript, Go, Rust, and more
ThemesLight and dark modes
Auto-indentSmart indentation based on language rules

Supported Languages

The code editor and execution engine support the following languages:

LanguageVersionFile Extension
JavaScriptNode.js.js
PythonPython 3.py
JavaJDK 17+.java
C++C++17.cpp
CC11.c
TypeScriptLatest.ts
GoLatest.go
RustLatest.rs
PHP8.x.php
Ruby3.x.rb
Swift5.x.swift
KotlinLatest.kt
C#.NET 6+.cs

Keyboard Shortcuts

Editing

ShortcutAction
Ctrl + /Toggle line comment
Ctrl + DSelect next occurrence
Ctrl + Shift + KDelete line
Alt + ↑ / ↓Move line up/down
Ctrl + Shift + EnterInsert line above
Ctrl + EnterInsert line below
Ctrl + ZUndo
Ctrl + Shift + ZRedo

Execution

ShortcutAction
Ctrl + EnterRun code
Ctrl + Shift + EnterSubmit solution
ShortcutAction
Ctrl + GGo to line
Ctrl + PQuick file open (IDE mode)
Ctrl + FFind
Ctrl + HFind and replace

Running Code

Quick Execution

  1. Write your code in the editor
  2. Select the correct language from the dropdown
  3. (Optional) Add input in the stdin panel
  4. Click Run or press Ctrl + Enter
  5. View output in the Output panel below

Problem Submissions

When solving a problem:

  1. Read the problem statement and constraints
  2. Write your solution in the editor
  3. Click Run to test against sample test cases
  4. Click Submit to test against all hidden test cases
  5. View detailed results: pass/fail per test case, runtime, and memory usage

Execution Limits

TierDaily RunsMonthly RunsMax Runtime
Free1520010 seconds
Pro1003,00015 seconds
Developer50015,00030 seconds

Input/Output

Standard Input

For problems that require reading from stdin, provide your input in the Input panel. Each line of input corresponds to one read operation.

Example (Python):

# Input panel contains:
# 5
# 1 2 3 4 5
 
n = int(input())
nums = list(map(int, input().split()))
print(sum(nums))
# Output: 15

Standard Output

Your program's output appears in the Output panel. Output is compared against expected results during submissions — whitespace is normalized (leading/trailing whitespace and trailing newlines are trimmed).

Error Handling

The editor provides clear feedback for common issues:

  • Compilation Errors — Shown inline with line numbers and error messages
  • Runtime Errors — Stack traces displayed in the output panel
  • Time Limit Exceeded (TLE) — Your code exceeded the maximum allowed runtime
  • Memory Limit Exceeded (MLE) — Your code used too much memory

Tips

  • Test locally first: Use the Run button with sample inputs before submitting
  • Check edge cases: Empty arrays, single elements, maximum constraints
  • Read the constraints: They hint at the expected time complexity
  • Use the language you know best: Don't switch languages mid-problem unless necessary

On this page