Code block from selection

by Dmitry Savosh
5
4
3
2
1
Score: 47/100

Description

Category: Coding & Technical Tools

The Code block from selection plugin simplifies the creation of code blocks in Obsidian by turning selected text into a formatted code block with a single command. Users can configure the plugin to specify their preferred programming languages and assign hotkeys for each language, enabling quick and efficient formatting. It works seamlessly by adding the necessary syntax before and after the selected text, making it ideal for organizing and formatting code snippets within notes.

Reviews

No reviews yet.

Stats

38
stars
12,216
downloads
1
forks
1,885
days
17
days
17
days
3
total PRs
0
open PRs
0
closed PRs
3
merged PRs
3
total issues
3
open issues
0
closed issues
0
commits

Latest Version

18 days ago

Changelog

Now can add as many languages as you want

README file from

Github

Code block from selection

This plugin for Obsidian adds a "Code block from selection" command that turns the selected text into a code block. It just adds ``` before and after the selected text. In the plugin settings you can specify which language to use in the code block. You can add as many languages as you like and assign hotkeys to them.

How to configure

Specify the programming language in the plugin settings (for example "c++"), then add the desired hotkey for the "Code block from selection" command on the Obsidian hotkeys panel.

How to use

Just select the text with code or put the cursor on the desired line and press hotkey.

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Advanced Tables
6 years ago by Tony Grosinger
Improved table navigation, formatting, and manipulation in Obsidian.md
Admonition
5 years ago by Jeremy Valentine
Adds admonition block-styled content to Obsidian.md
cMenu
5 years ago by Chetachi
An Obsidian.md plugin that adds a minimal text editor modal for a smoother writing/editing experience ✍🏽.
Smart Typography
5 years ago by mgmeyers
Converts quotes to curly quotes, dashes to em dashes, and periods to ellipses
Execute Code
4 years ago by twibiral
Obsidian Plugin to execute code in a note.
Markdown Formatting Assistant
5 years ago by Reocin
This Plugin provides a simple WYSIWYG Editor for Markdown and in addition a command line interface. The command line interface facilitate a faster workflow.
Table Extended
5 years ago by AidenLx
Extend basic table in Obsidian with MultiMarkdown table syntax
Any Block
3 years ago by LincZero
You can flexibility to create a 'Block' by many means. It also provides many useful features, like `list to table`. (obsidian/markdown-it/vuepress plugin/app)
VSCode Editor
3 years ago by Sun Xvming
Edit Code Files like VSCode in Obsidian.
Heading Level Indent
3 years ago by svonjoi
obsidian plugin for hierarchical structuration of document content based on heading levels
Shiki Highlighter
2 years ago by Moritz Jung
An Obsidian plugin that offers better code highlighting via shiki and Expressive Code.
Change Case
3 years ago by David Brockman
Plugin to let you change the case (camelCase, snake_case, etc) of the current selection.
Code Files
3 years ago by Lukas Bach
Plugin for ObsidianMD to show and edit code files along other notes.
Paste Mode
5 years ago by Jacob Levernier
Obsidian Notes plugin for pasting text and blockquotes to the cursor's current level of indentation.
SupSub
3 years ago by Wjgoarxiv
::SupSub enables wrapping selected text with `<sup>` or `<sub>` tags::
Code Block
4 years ago by Patrik Lindefors
Callout Integrator
3 years ago by
A plugin for Obsidian to allow the integration of long blocks of text into callouts.
Wrap with shortcuts
4 years ago by Manic Chuang
Wrap selected text in custom tags with shortcuts.
Auto pair chinese symbol
5 years ago by renmu123
中文符号自动补齐
Inline spoilers
2 years ago by logonoff
Adds Discord-like syntax for inline spoilers.
Ordered List Style
4 years ago by erykwalder
Writing
3 years ago by johackim
Write and format your next book directly from Obsidian
Multi-line Formatting
5 years ago by nmady
Format Obsidian text over an entire selection, even if that selection has paragraph breaks in the middle!
Embed Code File
4 years ago by Abdullah Almariah
Extended Markdown Syntax
a year ago by Kotaindah55
Extend your Markdown syntax using delimiters instead of HTML tags, such as underlining, superscript, subscript, highlighting, and spoiler.
Format Hotkeys
5 years ago by Ansel Santosa
Google Docs style formatting hotkeys for Obsidian
Remove Newlines
2 years ago by Elias Jaffe
A plugin for Obsidian.md which removes newlines and blank lines from selected or pasted text.
Formatto
2 years ago by Deca
Simple, fast, and easy-to-use Obsidian Markdown formatter.
Autocorrect Formatter
2 years ago by b-yp
A plugin running on Obsidian that utilizes autocorrect to format Markdown content.
Toggle Case
3 years ago by automattech
Obsidian plugin to toggle between `lowercase` `UPPERCASE` and `Title Case`
ObsidianTweaks
4 years ago by Jeppe Klitgaard
A plugin that implements a number of tweaks that should've been native to Obsidian.
Interlinear Glossing
3 years ago by Mijyuoon
An Obsidian plugin for interlinear glosses used in linguistics texts.
Blockquote Levels
4 years ago by Carlo Zottmann
A plugin for Obsidian (https://obsidian.md) that adds commands for increasing/decreasing the blockquote level of the current line or selection(s).
Code Block Labels
4 years ago by Sean Bowers
Provides labels for codeblocks in Obsidian
Stenography
5 years ago by bramses
LaTeX to unicode converter
3 years ago by fjdu
Convert LaTeX commands into unicode sequences
Paste Reformatter
a year ago by Keath Milligan
A plugin for Obsidian that reformats pasted HTML and plain text content, giving you precise control over how content is transformed when pasted into your notes.
Code::Stats
3 years ago by MiskaMyasa
The Code::Stats plugin allows you to track your coding progress and earn XP for writing markdown in the Obsidian editor.
Callout Toggles
2 years ago by Aly Thobani
An Obsidian plugin to quickly add, change, or remove callout wrappers in your notes.
Auto-\displaystyle Inline Math
2 years ago by Ryota Ushio
An Obsidian.md plugin to automatically make all inline maths \displaystyle.
Simple Code Formatter
2 years ago by SY
Format current code block in obsidian.
Text Conversions
3 years ago by Juan D Frias
Text conversions for Obsidian
heti
2 years ago by Moeyua
Canvas Format Brush
a year ago by wenlzhang
An Obsidian plugin that allows you to copy and paste formatting attributes (size and color) between canvas elements, similar to the format painter in Word.
Image Size
a year ago by Jie Zhang
Set the default size for pasted images.
Jisage -Japanese Indentation-
2 years ago by Telehakke
Obsidian plugin.
Alt-Click to Copy
2 years ago by Veer Sheth
Are.na unofficial
2 years ago by 0xroko
Unofficial Are.na plugin for Obsidian
复制图文 (Copy Image Text)
2 years ago by msgk
obsidian插件,复制笔记内容(包括文本和图片)到剪贴板
Image Helper
2 years ago by Chongmyung Park
Context menu to convert a image to another format in reading view in Obsidian.md
Better Order List
2 years ago by Boninall
Code Language Completer
2 years ago by Stanley Wang
minimal Obisdian plugin, fine-tuned to speed up developer note-taking
Svelte Syntax Highlighter
2 years ago by Typhoon-Kim
This plugin adds Svelte syntax highlighting to Obsidian.
Snippetsaurus
a year ago by Christian Humbert
Discord Timestamps
a year ago by Erika Gozar
Displays discord timestamps in read mode as they would appear in Discord.
Heading Toggler
2 years ago by Lord Turmoil
Toggle heading levels in Obsidian
Inline Code Copy
a year ago by Hongchen Lin
Bitcoin Block Stamp
2 years ago by sefiro
Stamp your Obsidian notes with the current Bitcoin block.
Chat clips
a year ago by sleepingraven
Record chat in ordinary markdown list.
Remove Unused Block IDs
2 years ago by Daniel Geneta
A simple plugin that removes unused block IDs for Obsidian.md
ruby.wasm
2 years ago by geeknees
Obsidian RubyWasm Plugin
Keyboard Formatter
8 months ago by Lauloque
Formats keyboard text (kbd) in your Obsidian notes quickly and consistently.
Vim Marker Sharpener
a year ago by Artem Dvoryadkin
Text formatting commands in Vim mode. Supports applying styles (bold, italic, etc.). Works correctly in visual mode with selected text.
Note Placeholder
a year ago by XZSt4nce
Replaces text of note link to placeholder in view mode.
Bottom to Top
a year ago by Henry Gustafson