Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

CodeBlock CRBasic

samutleysamutley74 downloads

Syntax highlighting for CRBasic (Campbell Scientific) markdown code blocks.

Add to Obsidian
CodeBlock CRBasic screenshot
  • Overview
  • Scorecard
  • Updates2

An Obsidian plugin that adds syntax highlighting for CRBasic — the programming language used by Campbell Scientific dataloggers (CR1000X, CR300, CR6, CR800, and others) — inside fenced markdown code blocks.

Features

  • ✅ Syntax highlighting in Edit / Live Preview mode (CodeMirror 6)
  • ✅ Syntax highlighting in Reading View (PrismJS-compatible classes)
  • ✅ Works with any Obsidian theme — uses the theme's built-in token colors
  • ✅ Case-insensitive matching (CRBasic is case-insensitive)
  • ✅ Highlights keywords, built-in functions, operators, constants, strings, comments, numbers, and preprocessor directives

What Gets Highlighted

Token Examples
Keywords BeginProg, EndProg, Scan, NextScan, If, Else, Sub, Public, Dim, For, While
Built-in functions VoltSE, PanelTemp, Average, Sample, DataTable, GPS, SerialOpen, HTTPGet
Logical operators AND, OR, NOT, MOD, XOR
Constants True, False, As, LoggerType
Preprocessor #If, #ElseIf, #EndIf
Strings "Hello World"
Comments ' this is a comment
Numbers 3.14, 60, 1000
Operators =, <>, >=, +=, &

Usage

Use the language identifier crbasic in a fenced code block:

```crbasic
' CR1000X example program

Public BattV As Float

DataTable(OneMin, True, -1)
  DataInterval(0, 1, Min, 10)
  Minimum(1, BattV, FP2, False)
EndTable

BeginProg
  Scan(5, Sec, 1, 0)
    Battery(BattV)
    CallTable OneMin
  NextScan
EndProg
```

Installation

From Community Plugins (recommended)

  1. Open Obsidian → Settings → Community plugins
  2. Turn off Restricted mode if prompted
  3. Click Browse and search for CodeBlock CRBasic
  4. Click Install, then Enable

Manual Installation

  1. Download main.js, manifest.json, and styles.css from the latest release
  2. Create the folder .obsidian/plugins/codeblock-crbasic/ inside your vault
  3. Copy the three files into that folder
  4. Open Obsidian → Settings → Community plugins → enable CodeBlock CRBasic

Building from Source

Requires Node.js 18+.

git clone https://github.com/utleysam/codeblock-crbasic.git
cd codeblock-crbasic
npm install --legacy-peer-deps
npm run build

The --legacy-peer-deps flag is required because the obsidian npm package has a peer dependency conflict with @codemirror/state versions.

After building, copy main.js, manifest.json, and styles.css to your vault's .obsidian/plugins/codeblock-crbasic/ folder.

Compatibility

Obsidian version Status
1.12.7+ ✅ Tested and working
Older versions Not tested

The plugin uses:

  • Plugin.registerEditorExtension() — available since Obsidian 0.13
  • Plugin.registerMarkdownCodeBlockProcessor() — available since Obsidian 0.12

Limitations

This plugin provides syntax highlighting only. It does not include:

  • Autocomplete or IntelliSense
  • Linting or error checking
  • Code formatting
  • Snippets
  • File type associations for .cr1x / .cr8 files

License

MIT

Acknowledgements

Token lists derived from the Campbell Scientific VSCode CRBasic extension (daiwalkr.cr-basic-ms-vscode). CRBasic is a product of Campbell Scientific, Inc.

HealthExcellent
ReviewPassed
About
Add CRBasic syntax highlighting to markdown code blocks.
SyntaxCode
Details
Current version
1.0.1
Last updated
2 months ago
Created
2 months ago
Updates
2 releases
Downloads
74
Compatible with
Obsidian 1.12.7+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
samutleysamutleyutleysam
GitHubutleysam
  1. Community
  2. Plugins
  3. Syntax
  4. CodeBlock CRBasic

Related plugins

VSCode Editor

Edit Code Files like VSCode.

Shiki Highlighter

Highlight code blocks with Shiki.

Argument Map with Argdown

Write Argdown code blocks and view the maps in reading mode.

Code Editor

Edit non-markdown text files (code, config, data) directly with syntax highlighting, line numbers, and word wrap.

Strudel REPL

Live-coding music environment — Strudel REPL integrated into your vault.

Ace Code Editor

An enhanced code editor using Ace editor, providing syntax highlighting, code folding, and other advanced editing features.

Code Suite

Execute code inside your notes: Shiki syntax highlighting with 65+ themes, live streaming output, inline Matplotlib and Plotly graphs, shared variables, and styled HTML and PDF export with outputs.

CodeBlock Language Detector

Automatically detects and adds language tags to code blocks without specified language for proper syntax highlighting.

Masking as MD

Open non-markdown files (.py, .html, .txt, .js, .css, etc.) as editable text documents directly in Obsidian.

Mermaid Tools

Improved Mermaid.js experience: visual toolbar with common elements and more.