Easy Codeblock
pendingby MatseVH
Insert code blocks quick and easily.
π¨ Code Block Inserter for Obsidian
Lightning-fast code block insertion with language selection and smart recents tracking
Stop fumbling with triple backticks and language names! This plugin makes inserting code blocks in Obsidian as easy as pressing two keys.
β¨ Features
π Smart Language Picker
- Instant search through 200+ programming languages
- Recently used languages automatically pinned to the top (last 5)
- Visual indicators show your favorite languages with β
- Fuzzy search matches both language names and codes
β‘ Lightning-Fast Hotkeys
- Alt + L β Insert code block with Language picker
- Alt + P β Insert Plain code block (no syntax highlighting)
π‘ Intelligent Behavior
- Wraps selected text automatically
- Empty search shows your recent languages first
- Search prioritizes recent matches at the top
- Recent languages persist across your session
π― Usage
Insert Code Block with Language
- Press Alt + L (or use Command Palette: "Insert code block")
- Start typing a language name (e.g., "python", "javascript", "rust")
- Hit Enter to insert
Example:
# Before (with "hello world" selected)
hello world
# After selecting "python"
```python
hello world
```
Insert Plain Code Block
Press Alt + P for instant plain code blocks - perfect for pseudocode, terminal output, or quick snippets.
```
your code here
```
πͺ Smart Recents in Action
First time using the plugin? You'll see all languages alphabetically.
After using Python, JavaScript, and TypeScript a few times:
[Search for a language...]
β Python
β TypeScript
β JavaScript
---
ActionScript
Bash
C
C++
...
Start typing "script"? Recent matches jump to the top:
Search: script
β TypeScript
β JavaScript
---
ActionScript
CoffeeScript
...
π οΈ Installation
From Obsidian Community Plugins
- Open Settings β Community Plugins
- Search for "Easy Codeblock"
- Click Install, then Enable
Manual Installation
- Download the latest release
- Extract to
.obsidian/plugins/easy-codeblock/ - Reload Obsidian
- Enable in Settings β Community Plugins
β¨οΈ Keyboard Usage
Adding to toolbar
- Open a note and tap inside the editing area to show the toolbar.
- Tap the
configure mobile toolbar (wrench icon)button. - Find
Easy Code Block: Insert code blockand/orEasy Code Block: Insert code block (no language)and add it toManage toolbar optionsby clicking the plus icon. - If you can't find it, scroll to the bottom. In the
Add global commandsection, search forEasy Code Block: Insert code blockand/orEasy Code Block: Insert code block (no language).
Customizing Hotkeys
Don't like Alt + L and Alt + P?
- Go to Settings β Hotkeys
- Search for "Easy Codeblock"
- Set your preferred shortcuts
π¨ Supported Languages
Over 200 languages including:
Popular: JavaScript, TypeScript, Python, Java, C++, Rust, Go, PHP, Ruby, Swift
Web: HTML, CSS, SCSS, Vue, React (JSX/TSX)
Markup: Markdown, YAML, JSON, XML, TOML
Systems: Bash, PowerShell, Dockerfile, SQL
And many more! The full list is powered by Prism.js syntax highlighting.
π€ Contributing
Found a bug? Have an idea? Contributions welcome!
- Fork the repository
- Create your feature branch
- Submit a pull request
π License
MIT License - feel free to use this in your own projects!
π¬ Support
- π Report bugs
- π‘ Request features
- β Star on GitHub if you find this useful!
Made with β€οΈ for the Obsidian community
Stop typing backticks. Start writing faster.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.