GithubHelp home page GithubHelp logo

tianya3796 / coc-markmap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from markmap/coc-markmap

0.0 1.0 0.0 49 KB

Home Page: https://markmap.js.org/

License: MIT License

JavaScript 17.94% TypeScript 80.82% Shell 1.25%

coc-markmap's Introduction

coc-markmap

NPM

Visualize your Markdown as mindmaps with markmap.

This is an extension for coc.nvim.

If you prefer a CLI version, see markmap-cli.

Note: coc-markmap allows generating markmaps from current buffer or selected text, while the CLI version can only create markmaps from Markdown files.

markdown mindmap

Installation

First, make sure coc.nvim is started.

Then install with the Vim command:

:CocInstall coc-markmap

Usage

Generating markmap HTML

Open a Markdown, and execute:

:CocCommand markmap.create

An HTML file with the same basename as the Markdown file will be created and opened in your default browser. If there is a selection, it will be used instead of the file content.

Transforming plugins are enabled by default, including syntax highlight with PrismJS and math typesetting with Katex.

Watching mode

There is also a watching mode:

:CocCommand markmap.watch

The markmap will update once the markdown file changes, and the node under cursor will always be visible in the viewport on cursor move.

Configurations

CocConfig

You can change some global configurations for this extension in coc-settings.json.

First open the settings file with :CocConfig.

Key mappings

There is no default key mapping, but you can easily add your own:

" Create markmap from the whole file
nmap <Leader>m <Plug>(coc-markmap-create)
" Create markmap from the selected lines
vmap <Leader>m <Plug>(coc-markmap-create-v)

Commands

It is also possible to add a command to create markmaps.

command! -range=% Markmap CocCommand markmap.create <line1> <line2>

Now you have the :Markmap command to create a Markmap, either from the whole file or selected lines.

coc-markmap's People

Contributors

gera2ld avatar straydragonv avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.