CodeBlock CRBasic

Syntax highlighting for CRBasic code blocks in Obsidian.
A simple guide to install and use the plugin.

1

What You Need

The plugin is made up of 3 small files. That's it — no installer, no app store, just 3 files:

📄 main.js The plugin code (~16 KB)
📄 manifest.json Tells Obsidian the plugin's name and version
📄 styles.css Style sheet (mostly empty — uses your theme's colors)

These files should have been provided to you alongside this guide. If you're missing any of them, ask the person who shared the plugin with you.

2

Find Your Obsidian Vault Folder

Your vault is the folder on your computer where Obsidian stores all your notes. You chose this folder when you first set up Obsidian.

Not sure where it is? Open Obsidian, then:

  1. Click the Settings gear icon (bottom-left corner)
  2. Look at the very bottom of the left sidebar — it shows your vault name
  3. Click Files & Links in the sidebar
  4. The path shown at the top is your vault folder

Or simply: open File Explorer (Windows) or Finder (Mac) and navigate to wherever your notes live.

Tip

Inside your vault folder, there's a hidden folder called .obsidian. On Windows, you may need to turn on "Show hidden items" in File Explorer's View menu to see it.

3

Create the Plugin Folder

Inside your vault, navigate to this path:

Your Vault.obsidianpluginscodeblock-crbasic

You may need to create some of these folders if they don't exist yet:

  • The plugins folder should already exist if you've ever used a community plugin. If it doesn't, create it.
  • Create a new folder inside plugins called exactly: codeblock-crbasic

For example, if your vault is at C:\Users\Me\Documents\MyVault, the full path would be:

C:\Users\Me\Documents\MyVault\.obsidian\plugins\codeblock-crbasic
4

Copy the 3 Files

Copy main.js, manifest.json, and styles.css into the codeblock-crbasic folder you just created.

When you're done, the folder should look like this:

📁 codeblock-crbasic/
📄 main.js
📄 manifest.json
📄 styles.css

That's all the files. Nothing else to download or install.

5

Enable the Plugin in Obsidian

  1. Restart Obsidian (close it completely and re-open it)
  2. Open Settings (gear icon, bottom-left)
  3. Click Community plugins in the left sidebar
  4. If you see a message about Restricted Mode, click "Turn on community plugins"
  5. You should see "CodeBlock CRBasic" in the list of installed plugins
  6. Toggle the switch next to it so it turns on (blue/purple)
Don't see it?

Double-check that all 3 files are in the correct folder, and that the folder is named exactly codeblock-crbasic (no typos, no extra spaces). Then restart Obsidian again.


6

How to Use It

In any Obsidian note, create a code block by typing three backticks followed by crbasic, then your code, then three backticks to close:

```crbasic
'CR1000X Example Program
Public LoggerTemp, BattV
Public Dest(9)

DataTable (Test,1,-1)
  DataInterval (0,15,Sec,10)
  Minimum (1,BattV,FP2,False,False)
  Sample (1,LoggerTemp,FP2)
EndTable

BeginProg
  Scan (1,Sec,0,0)
    PanelTemp (LoggerTemp,15000)
    Battery (BattV)
    CallTable Test
  NextScan
EndProg
```

Once you type this into a note, you'll see the code light up with colors:

'CR1000X Example Program
Public LoggerTemp, BattV
Public Dest(9)

DataTable (Test,1,-1)
  DataInterval (0,15,Sec,10)
  Minimum (1,BattV,FP2,False,False)
  Sample (1,LoggerTemp,FP2)
EndTable

BeginProg
  Scan (1,Sec,0,0)
    PanelTemp (LoggerTemp,15000)
    Battery (BattV)
    CallTable Test
  NextScan
EndProgPreview

What gets colored:

  • KeywordsBeginProg, EndProg, Scan, NextScan, Public, Dim, If, Else, etc.
  • Built-in functionsPanelTemp, Battery, DataTable, DataInterval, VoltDiff, Average, etc.
  • Numbers1, 15000, 3.14
  • Strings"M!", "Hello"
  • Comments — anything after an apostrophe: 'this is a comment
  • ConstantsTrue, False
Both views work

Syntax highlighting works in both Edit mode (where you type) and Reading mode (the clean preview). Toggle between them with the book/pencil icon in the top-right corner of a note.


7

Quick Test

Want to make sure everything is working? Follow this 30-second test:

  1. Open Obsidian
  2. Create a new note (click the "New note" icon or press Ctrl+N)
  3. Click the Copy button on the example code above
  4. Paste it into the note (Ctrl+V)
  5. You should immediately see colored keywords in the code block
  6. Switch to Reading mode (click the book icon top-right) — the colors should appear there too

If you see colors — you're all set!


?

Troubleshooting

No colors showing up at all?

  • Make sure the code block starts with exactly ```crbasic (three backticks, then the word crbasic, no space between them)
  • Make sure the plugin is enabled in Settings → Community plugins
  • Try restarting Obsidian completely (close and re-open)

Plugin doesn't appear in the plugin list?

  • The folder must be named exactly codeblock-crbasic
  • All 3 files (main.js, manifest.json, styles.css) must be directly inside that folder — not in a sub-folder
  • Make sure Community Plugins / Restricted Mode is turned off

Can't find the .obsidian folder?

  • Windows: In File Explorer, click View in the top menu, then check "Hidden items"
  • Mac: In Finder, press Cmd + Shift + . (period) to show hidden files
  • Linux: Press Ctrl + H in your file manager