Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Last commit Repository Stars Issues Open Issues Bug Issues

eyecatch

morg

Markdown editing support plugin.



🚀 How to use

ddu-source-outline

call ddu#start(#{ sources: [#{ name: 'outline' }] })

Note

Can search outline by Japanease when with use ddu-filter-kensaku.

call ddc#custom#patch_global({
\     "outline": {
\       'matchers': ['matcher_kensaku'],
\     }}

Example

Place the cursor over a code block and press <leader>er to execute the code block.

vim.api.nvim_create_autocmd("BufEnter", {
        pattern = {"*.md", "*.markdown"},
        callback = function ()
                vim.keymap.set("n", "<leader>er", "<cmd>call morg#run()<CR>")
        end
})

API

morg#context_codeblock

morg#context_codeblock(...)

Returns the language and code string of the code block under the cursor. If the cursor is not in a code block, -1 is returned.

morg#run

morg#run()

Run Quickrun with the code obtained with morg#context_codeblock.

morg#tangle_all

morg#tangle_all()

Returns a string that converts all code blocks in the file into a single string.

morg#tangle_block

morg#tangle_block(...)

This is equivalent to call morg#context_codeblock().src.

⛏️ Development

# Check
deno check *.ts

# Format
deno fmt

📝 Todo

  • Move remarkParse to deps.ts.

📜 License

MIT

🧩 Modules

About

Markdown editing support plugin.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages