Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>code-lc4riNew to Visual Studio Code? Get it now.
code-lc4ri

code-lc4ri

yasutakatou

|
43 installs
| (0) | Free
LC4RI for VS Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

code-lc4ri

code-lc4ri: Markdown + LC4RI for VS Code

Github issues Github forks Github stars Github top language Github license

Tags

vscode vscode-extension typescript nodejs lc4ri markdown

Demo

lc4ri

Do you often use "jupyter notebook" when choosing a documentation tool for your operations manual?
But, this include problems

  • document used splited to like a card. So, when insert document, insert card every. I don't fit in this operation.
  • In case of operation of the order, I have to switch the cards up and down. I wish to edit like a text editer.
  • I wish to use ecosystem(lint tool, etc). But, not easy preparation.

jupyter is very excellent tool, but I know more usefull for text edit. it's VSCode!
My idea is, Markdown + LC4RI on VSCode's ecosystem is more better solution!

Advantages

This extention, usually write markdown document. and additional commands can be executed.

  • write document on markdown format.
  • list format on markdown is can run command.
  • command output to auto apply to document.
  • can use variable.

Installation

Visual Studio Marketplace

download vsix from release page.
save vsix file, install how to.

uninstall

uninstalld extension.

use case

recommendation

set keybindings.json, enable it's shortcut do.

[
	{
		"key": "ctrl+shift+a",
		"command": "extension.lc4ri",
		"args": "code-lc4ri: LC4RI for VS Code"
	}
]

formats

Basic. You can write markdown usually, but it's can run following.
run this extension, line search, if match rule line, run commands. start line is editor's cursor position.

list format

  • list strings can be run.
- ls

1

note) If not exists code section after list, will create code section and output to it.
note) Tab indents means, If command success is next indent run. (AND rule)

- ls existsfile.txt
	- rm existsfile.txt

If "ls existsfile.txt" is success, next indent run.

horizon line

If you write horizon line, split commands.

- ls

*** 

- uname

2

3

note) In this case, run command to the horizon line.

variable

number list is create variable value.

1. uname

create variable {1}.

- echo {1}

variable {1} output.

4

note) variable can use 1-9 integer.

file open (v0.91-)

To the top "!" at the beginning opens the specified file in a new tab

- ! \code.txt

image

v0.5: "config file" support!

This extension easier use, support config file.

sample setting

json format.

{
  "timeout": 10000,
  "template": {
    "linux": "ssh user@192.168.0.1 {COMMAND}"
  },
  "changeWord": {
    "#HOME#": "/home/user"
  },
  "toutf8": true,
  "toterminal": true
}

file create

If does not exist, it will be created in the following folder.

  • Windows
    • %USERPROFILE%/.code-lc4ri/config.json
      • ex) C:\Users(USER NAME).code-lc4ri\config.json
  • Other OS
    • $HOME/.code-lc4ri/config.json
      • ex) /home/user/.code-lc4ri/config.json

file load

When VSCode run, loading config.

options

options detail following.

timeout

This option is the timeout time when the command is executed.
Units are in milliseconds.

10000 -> 10 seconds.

template

This option is default commands template, and can be defined on a per-OS.
For example, you want to execute every commands on SSH destination.
In case of can set this option.

	"OS type":"template"

"OS Type" is following.

process.platform

{COMMAND} included the original commands.

	"linux": "ssh user@192.168.0.1 {COMMAND}"
  • normal
    • - ls
  • define
    • ssh user@192.168.0.1 "{COMMAND}"
  • execute commands
    • ssh user@192.168.0.1 ls

chageWord

This option is convert keywords list.
If server address changes often, If you don't want to use commands that are dangerous to execute.
In case of can set this option.
Defines a set of words before and after conversion.

	"pre word": "after word"
  • normal
    • - ls #HOME#
  • define
    • "#HOME#": "/home/user"
  • execute commands
    • ls /home/user

toutf8 (v0.91-)

If set to false, force UTF-8 conversion process to be skipped (default is true)
However, it is not working properly on my Windows...

toterminal (v0.91-)

If true, the command execution results are not returned to the markdown, but are executed directly on the open terminal.

image

v0.6: executed time auto print.

5

It can be used as evidence of execution time.


LICENSE

MIT License

Contributors

  • yasutakatou
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft