Code section navigation for VS Code
  Organize and navigate large files with simple comment patterns
Transform your code files into organized, navigable documents with a table of contents-like structure. Create sections using simple comments, then use VS Code's built-in Outline panel to view and instantly jump to any section with a single click.
- Simple syntax: 
# Section Name ---- - Table of contents experience: Comments become navigable outline entries
 - Hierarchical nesting: 
##,###,####for multi-level organization - Multi-language support: Works with any comment style including JSX 
{/* // Section ---- */} - Lightweight & fast: Only responds to simple comments, no complex parsing
 - VS Code integration: Seamless outline view, breadcrumbs, and Go to Symbol
 - Zero configuration: Works immediately
 
To use:
- Install the extension
 - Open any code file (or create a new one)
 - Add comment sections ending with 
----(4 or more dashes) to trigger code organization - Check the Outline panel in VS Code's Explorer sidebar
 - Click any section to jump to it instantly
 
Tip: Use Command Palette (Ctrl+Shift+P / Cmd+Shift+P) → Code Organizer: Show Code Organizer to quickly open the view
| Language | Example | Nesting | 
|---|---|---|
| Python, R, Shell | # Section ---- | 
##, ###, #### | 
| JavaScript, TypeScript, C++, Java, Go, Rust | // Section ---- | 
////, //////, //////// | 
| React JSX, TSX | {/* // Section ---- */} | 
{/* //// */}, {/* ////// */} | 
| SQL, PostgreSQL | -- Section ---- | 
----, ------, -------- | 
Works with: Python • JavaScript • TypeScript • React/JSX • Java • C# • C++ • Go • Rust • Swift • PHP • SQL • R • Shell • and more...
# 1. Configuration ----
DATABASE_URL = "localhost"
API_KEY = "secret"
## 1.1 Database Settings ----
def connect():
    return db.connect(DATABASE_URL)
### 1.1.1 Connection Pool ----
def create_pool():
    return ConnectionPool()
## 1.2 API Settings ----
def setup_api():
    return API(API_KEY)
# 2. Main Application ----
def run():
    db = connect()
    api = setup_api(){/* // 1. Component Setup ---- */}
import React, { useState, useEffect } from 'react';
function TodoApp() {
  {/* // 1.1 State Management ---- */}
  const [todos, setTodos] = useState([]);
  const [filter, setFilter] = useState('all');
  {/* //// 1.1.1 Todo Operations ---- */}
  const addTodo = (text) => {
    setTodos([...todos, { id: Date.now(), text, done: false }]);
  };
  {/* // 2. Render Logic ---- */}
  return (
    <div className="todo-app">
      {/* // 2.1 Header Section ---- */}
      <header>
        <h1>Todo List</h1>
        <TodoInput onAdd={addTodo} />
      </header>
      {/* // 2.2 Main Content ---- */}
      <main>
        <TodoList todos={filteredTodos} />
        <TodoFilters currentFilter={filter} onFilterChange={setFilter} />
      </main>
    </div>
  );
}// 1. App Configuration ----
const config = {
    apiUrl: 'https://api.example.com',
    timeout: 5000
};
//// 1.1 Helper Functions ----
function getData() {
    return fetch(config.apiUrl);
}
function processData(data) {
    return data.map(item => item.value);
}
// 2. Main Application ----
class App {
    constructor() {
        this.data = [];
    }
    
    //// 2.1 Event Handlers ----
    handleClick(event) {
        console.log('Clicked:', event.target);
    }
}-- 1. Database Setup ----
CREATE DATABASE myapp;
USE myapp;
---- 1.1 Tables ----
CREATE TABLE users (
    id INT PRIMARY KEY,
    name VARCHAR(100),
    email VARCHAR(255)
);
------ 1.1.1 Indexes ----
CREATE INDEX idx_user_email ON users(email);
---- 1.2 Stored Procedures ----
DELIMITER $$
CREATE PROCEDURE GetUser(IN user_id INT)
BEGIN
    SELECT * FROM users WHERE id = user_id;
END$$
DELIMITER ;
-- 2. Sample Data ----
INSERT INTO users VALUES (1, 'John Doe', 'john@example.com');- Large files are hard to navigate - scrolling through 1000+ line files
 - VS Code's outline only shows functions/classes - not logical code sections
 - No consistent organization across different programming languages
 - Lost context when jumping between different parts of complex files
 
Simple, universal comment patterns that work everywhere with instant VS Code integration.
Perfect for polyglot developers working across multiple programming languages.
| Feature | Code Organizer | Bookmarks | Better Comments | Region Folding | 
|---|---|---|---|---|
| Automatic structure detection | ✅ | ❌ | ❌ | ❌ | 
| Hierarchical organization | ✅ | ❌ | ❌ | |
| Multi-language support | ✅ | ✅ | ✅ | |
| Outline integration | ✅ | ❌ | ❌ | ❌ | 
| Zero configuration | ✅ | ❌ | ❌ | ❌ | 
| Comment-based | ✅ | ❌ | ✅ | 
VS Code Marketplace: Open Extensions (Ctrl+Shift+X) → Search "Code Organizer" → Install
Command Line:
code --install-extension ran-codes.code-organizer-vscodeSee CHANGELOG.md for detailed release information.
- 🆕 Custom Activity Bar View: Dedicated Code Organizer tab with custom icon
 - 🆕 Editor-Outline Sync: Auto-scroll outline view as you navigate through code
 - 🆕 "Show Code Organizer" Command: Quick access via Command Palette
 - 🆕 High Resolution Icon: Professional hexagon design for marketplace
 - Enhanced TreeView with caching for reliable navigation
 - Improved section highlighting with visual decorations
 
- 🆕 Markdown & Quarto Support: Native header detection for 
.mdand.qmdfiles - Smart code chunk handling - ignores headers inside fenced code blocks
 - Language-specific parsing for markdown documents
 - Perfect for data science workflows in Posit/VSCode
 
- Cursor Compatibility: Downgraded VSCode engine to ^1.99.0 for broader editor support
 
- 🆕 JSX/TSX Support: Added React JSX comment syntax 
{/* // Section ---- */} - Enhanced regex pattern to handle whitespace variations in JSX comments
 - Improved language support for React and TypeScript React developers
 - Comprehensive test coverage for JSX comment detection
 
- Support for 
#,//, and--comment styles - Hierarchical section nesting up to 4 levels
 - VS Code outline integration
 - Multi-language support
 - Zero configuration setup
 
MIT License - see LICENSE file for details.
Inspired by RStudio's Code Sections • Built with ❤️ for the VS Code community

