HansKre / markdown-execute

VSCode Extension to execute commands directly from Markdown
MIT License
9 stars 0 forks source link

makrdown-execute

VSCode Extension which allows you to execute code from markdown files.

Alternatively, use cmd+f1 (mac) / ctrl+f1 (windows) shortcut to execute current selection.

Features

Execute code blocks in terminal

demo-execute

Execute Selection

Select code and either use shortcut cmd+f1 (mac) / ctrl+f1 (windows) to execute or open the VSCode command palette and type markdown execute to find the command:

demo-shortcut

Side By Side view

If you interact with terminal very often, I recomment using the terminal in editor area side by side in split view.:

side-by-side-view

Extension Settings

This extension contributes the following settings:

Backlog

  1. Analyse and fix why the watch-task in debugging terminal is ignored
  2. Add PHP & TypeScript as execution runtimes:
    1. commandCodeLensProvider:
      1. Execute command with TS
      2. Execute command PHP
    2. extension.ts & execute.ts:
      1. Add PHP and TS as execution runtimes
  3. Add quick select keybinding without promting:
    1. cmd+f1 s Execute command as Shell
    2. cmd+f1 s Execute command with Nodejs

Appreciations

Sycl´s Markdown Command Runner Extension served as inspiration. Thanks!

It was lacking execution of code blocks in active SSH sessions, shortcuts and NodeJs-support, so I made my own.